示例#1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="MqttConnectMessage" /> class.
        /// </summary>
        /// <remarks>
        ///     Only called via the MqttMessage.Create operation during processing of an Mqtt message stream.
        /// </remarks>
        public MqttConnectMessage() {
            this.Header = new MqttHeader().AsType(MqttMessageType.Connect);

            this.VariableHeader = new MqttConnectVariableHeader() {
                ConnectFlags = new MqttConnectFlags()
            };

            this.Payload = new MqttConnectPayload(this.VariableHeader);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MqttConnectMessage"/> class.
        /// </summary>
        /// <remarks>
        /// Only called via the MqttMessage.Create operation during processing of an Mqtt message stream.
        /// </remarks>
        public MqttConnectMessage()
        {
            this.Header = new MqttHeader().AsType(MqttMessageType.Connect);

            this.VariableHeader = new MqttConnectVariableHeader()
            {
                ConnectFlags = new MqttConnectFlags()
            };

            this.Payload = new MqttConnectPayload(this.VariableHeader);
        }
示例#3
0
 /// <summary>
 /// Reads a message from the supplied stream.
 /// </summary>
 /// <param name="messageStream">The message stream.</param>
 public override void ReadFrom(Stream messageStream)
 {
     this.VariableHeader = new MqttConnectVariableHeader(messageStream);
     this.Payload        = new MqttConnectPayload(this.VariableHeader, messageStream);
 }
示例#4
0
 /// <summary>
 ///     Reads a message from the supplied stream.
 /// </summary>
 /// <param name="messageStream">The message stream.</param>
 public override void ReadFrom(Stream messageStream) {
     this.VariableHeader = new MqttConnectVariableHeader(messageStream);
     this.Payload = new MqttConnectPayload(this.VariableHeader, messageStream);
 }