/// <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 MqttSubscribeVariableHeader(messageStream); this.Payload = new MqttSubscribePayload(Header, VariableHeader, messageStream); }
/// <summary> /// Initializes a new instance of the <see cref="MqttSubscribeMessage" /> class. /// </summary> /// <remarks> /// Only called via the MqttMessage.Create operation during processing of an Mqtt message stream. /// </remarks> public MqttSubscribeMessage() { this.Header = new MqttHeader().AsType(MqttMessageType.Subscribe); this.VariableHeader = new MqttSubscribeVariableHeader(); this.Payload = new MqttSubscribePayload(); }