Пример #1
0
        internal static V3ConnectVariableHeader FromStream(Stream stream)
        {
            var header = new V3ConnectVariableHeader
            {
                ProtocolName    = MQString.FromStream(stream),
                Protocolversion = stream.ReadByteOrFail(),
                ConnectFlags    = ConnectFlags.FromStream(stream),
                KeepAliveTimer  = stream.ReadUint16()
            };

            return(header);
        }
Пример #2
0
        internal static V3ConnectVariableHeader FromStream(Stream stream)
        {
            var header = new V3ConnectVariableHeader
            {
                ProtocolName    = MqString.FromStream(stream),
                Protocolversion = stream.ReadBytesOrFailAsync(1).Await().Result[0],
                ConnectFlags    = ConnectFlags.FromStream(stream),
                KeepAliveTimer  = stream.ReadUint16()
            };

            return(header);
        }
Пример #3
0
 public Connect(FixedHeader header, byte[] data)
     : base(header)
 {
     if (data != null)
     {
         using (var stream = new MemoryStream(data))
         {
             Details = V3ConnectVariableHeader.FromStream(stream);
             LoadPayload(stream);
         }
     }
     else
     {
         Details = new V3ConnectVariableHeader(180, new ConnectFlags());
     }
 }
Пример #4
0
 public Connect(FixedHeader header, byte[] data)
     : base(header)
 {
     if (data != null)
     {
         using (var stream = new MemoryStream(data))
         {
             Details = V3ConnectVariableHeader.FromStream(stream);
             LoadPayload(stream);
         }
     }
     else
     {
         Details = new V3ConnectVariableHeader(180, new ConnectFlags());
     }
 }
Пример #5
0
        internal static V3ConnectVariableHeader FromStream(Stream stream)
        {
            var header = new V3ConnectVariableHeader
                {
                    ProtocolName = MqString.FromStream(stream),
                    Protocolversion = stream.ReadBytesOrFailAsync(1).Await().Result[0],
                    ConnectFlags = ConnectFlags.FromStream(stream),
                    KeepAliveTimer = stream.ReadUint16()
                };

            return header;
        }
Пример #6
0
        internal static V3ConnectVariableHeader FromStream(Stream stream)
        {
            var header = new V3ConnectVariableHeader
                {
                    ProtocolName = MQString.FromStream(stream),
                    Protocolversion = stream.ReadByteOrFail(),
                    ConnectFlags = ConnectFlags.FromStream(stream),
                    KeepAliveTimer = stream.ReadUint16()
                };

            return header;
        }