public final class ProxyProtocolDecoder extends Object
proxy_protocol on;
| Modifier and Type | Method and Description |
|---|---|
static Packet |
decode(ChannelContext context,
ByteBuffer buffer,
int readableLength,
DecoderFunction next)
解码 proxy protocol
|
static ProxyProtocolMessage |
decodeForTest(ByteBuffer buffer,
int readableLength)
解码 proxy protocol
|
static Packet |
decodeIfEnable(ChannelContext context,
ByteBuffer buffer,
int readableLength,
DecoderFunction next)
解码,如果开启了 proxy protocol
|
static ProxyProtocolMessage |
decodeMessage(ByteBuffer buffer,
int readableLength)
解码 proxy protocol
|
static void |
enableProxyProtocol(ChannelContext context)
开始 proxy protocol
|
static boolean |
isProxyProtocolEnabled(ChannelContext context)
判断是否开启 proxy protocol
|
static void |
removeProxyProtocol(ChannelContext context)
去掉 proxy protocol
|
public static void enableProxyProtocol(ChannelContext context)
context - ChannelContextpublic static void removeProxyProtocol(ChannelContext context)
context - ChannelContextpublic static boolean isProxyProtocolEnabled(ChannelContext context)
context - ChannelContextpublic static Packet decodeIfEnable(ChannelContext context, ByteBuffer buffer, int readableLength, DecoderFunction next) throws TioDecodeException
context - ChannelContextbuffer - ByteBufferreadableLength - readableLengthnext - 下一个解码器TioDecodeException - TioDecodeExceptionpublic static Packet decode(ChannelContext context, ByteBuffer buffer, int readableLength, DecoderFunction next) throws TioDecodeException
context - ChannelContextbuffer - ByteBufferreadableLength - readableLengthnext - 下一个解码器TioDecodeException - TioDecodeExceptionpublic static ProxyProtocolMessage decodeForTest(ByteBuffer buffer, int readableLength) throws TioDecodeException
buffer - ByteBufferreadableLength - readableLengthTioDecodeException - TioDecodeExceptionpublic static ProxyProtocolMessage decodeMessage(ByteBuffer buffer, int readableLength) throws TioDecodeException
buffer - ByteBufferreadableLength - readableLengthTioDecodeException - TioDecodeExceptionCopyright © 2025. All rights reserved.