Package one.nio.net
Class ProxyProtocol
java.lang.Object
one.nio.net.ProxyProtocol
PROXY protocol handler for the server side.
See http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final byte[] -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PROXY_PROTOCOL_START
private static final byte[] PROXY_PROTOCOL_START -
MAX_PROXY_PROTOCOL_HEADER
private static final int MAX_PROXY_PROTOCOL_HEADER- See Also:
-
MIN_PROXY_PROTOCOL_HEADER
private static final int MIN_PROXY_PROTOCOL_HEADER- See Also:
-
-
Constructor Details
-
ProxyProtocol
public ProxyProtocol()
-
-
Method Details
-
parse
- Throws:
IOException
-
parseIPv4
private static int parseIPv4(byte[] buffer, int offset, byte[] addr) -
parseIPv6
private static int parseIPv6(byte[] buffer, int offset, byte[] addr) -
parsePort
private static int parsePort(byte[] buffer, int offset)
-