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);
public static UdpPackData Parse(ReadOnlyMemory <byte> buffer) { var packData = new UdpPackData { Remote = SocksRemote.Parse(buffer, out var mem), Data = mem.ToArray() }; return(packData); }