public static HeartbeatExtension ReadHeartbeatExtension(byte[] extensionData)
        {
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }
            MemoryStream       memoryStream = new MemoryStream(extensionData, writable: false);
            HeartbeatExtension result       = HeartbeatExtension.Parse(memoryStream);

            TlsProtocol.AssertEmpty(memoryStream);
            return(result);
        }
        public static HeartbeatExtension ReadHeartbeatExtension(byte[] extensionData)
        {
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }
            MemoryStream       input     = new MemoryStream(extensionData, false);
            HeartbeatExtension extension = HeartbeatExtension.Parse(input);

            TlsProtocol.AssertEmpty(input);
            return(extension);
        }
예제 #3
0
        public static HeartbeatExtension ReadHeartbeatExtension(byte[] extensionData)
        {
            //IL_0008: Unknown result type (might be due to invalid IL or missing references)
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            //IL_0016: Expected O, but got Unknown
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }
            MemoryStream       val    = new MemoryStream(extensionData, false);
            HeartbeatExtension result = HeartbeatExtension.Parse((Stream)(object)val);

            TlsProtocol.AssertEmpty(val);
            return(result);
        }