/// <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); }
/// <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); }
/// <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); }