예제 #1
0
파일: Connect.cs 프로젝트: hezlog/MQTT
        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
파일: Connect.cs 프로젝트: hezlog/MQTT
        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);
        }