Class ProxyProtocolReader
Parses a PROXY protocol v1 or v2 preamble.
Inheritance
ProxyProtocolReader
Namespace: Titanium.Web.Proxy.Network
Assembly: Titanium.Web.Proxy.dll
Syntax
public static class ProxyProtocolReader
Methods
|
Edit this page
View Source
TryParse(ReadOnlySpan<byte>, out IPEndPoint?, out int)
Declaration
public static bool TryParse(ReadOnlySpan<byte> buffer, out IPEndPoint? client, out int consumed)
Parameters
Returns
|
Edit this page
View Source
TryReadAsync(Socket, CancellationToken, IPEndPoint?)
Reads exactly the preamble and nothing after it, so the first application bytes (for example a TLS
ClientHello) stay in the socket. Returns false for a malformed or truncated preamble.
Declaration
public static ValueTask<bool> TryReadAsync(Socket socket, CancellationToken cancellationToken, IPEndPoint? client = null)
Parameters
Returns