示例#1
0
        public static unsafe SocksRemote Parse(ReadOnlyMemory <byte> buffer, out ReadOnlyMemory <byte> left)
        {
            var result = new SocksRemote
            {
                AddressType = buffer.Span[0]
            };

            result.Address = DecodeAddress(buffer[1..], result.AddressType, out var other);
示例#2
0
        public static UdpPackData Parse(ReadOnlyMemory <byte> buffer)
        {
            var packData = new UdpPackData
            {
                Remote = SocksRemote.Parse(buffer, out var mem),
                Data   = mem.ToArray()
            };

            return(packData);
        }