/// <summary> /// Initializes a new instance of the <see cref="MqttSubscribePayload" /> class. /// </summary> /// <param name="header">The header to use for the message.</param> /// <param name="variableHeader">The variable header to use for the message.</param> /// <param name="payloadStream">The payload stream.</param> public MqttSubscribePayload(MqttHeader header, MqttSubscribeVariableHeader variableHeader, Stream payloadStream) { this.header = header; this.variableHeader = variableHeader; ReadFrom(payloadStream); }
/// <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="MqttSubscribePayload" /> class. /// </summary> /// <param name="header">The header to use for the message.</param> /// <param name="variableHeader">The variable header to use for the message.</param> /// <param name="payloadStream">The payload stream.</param> public MqttSubscribePayload(MqttHeader header, MqttSubscribeVariableHeader variableHeader, Stream payloadStream) { this.header = header; this.variableHeader = variableHeader; ReadFrom(payloadStream); }