Exemple #1
0
 /// <summary>
 ///     Reads a message from the supplied stream.
 /// </summary>
 /// <param name="messageStream">The message stream.</param>
 public override void ReadFrom(Stream messageStream)
 {
     base.ReadFrom(messageStream);
     this.VariableHeader = new MqttPublishVariableHeader(this.Header, messageStream);
     this.Payload        = new MqttPublishPayload(this.Header, this.VariableHeader, messageStream);
 }
Exemple #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="MqttPublishMessage" /> class.
 /// </summary>
 /// <remarks>
 ///     Only called via the MqttMessage.Create operation during processing of an Mqtt message stream.
 /// </remarks>
 public MqttPublishMessage()
 {
     this.Header         = new MqttHeader().AsType(MqttMessageType.Publish);
     this.VariableHeader = new MqttPublishVariableHeader(this.Header);
     this.Payload        = new MqttPublishPayload();
 }