Top Description Fields Constructors Methods
reactor.netty5.http.server

pack-priv final Class HAProxyMessageDetector

extends ByteToMessageDecoder
Class Inheritance
Imports
io.netty5.buffer.Buffer, io.netty5.channel.ChannelHandlerContext, io.netty5.handler.codec.ByteToMessageDecoder, .ProtocolDetectionResult, io.netty.contrib.handler.codec.haproxy.HAProxyMessageDecoder, .HAProxyProtocolVersion, reactor.netty5.NettyPipeline

Auto detect whether the first packet of a channel is proxy protocol, if so, replace current handler with a HAProxyMessageDecoder, so each channel in the same HttpServer instance can choose to support proxy protocol or not at runtime.
Author
aftersss

Field Summary

Inherited from io.netty5.handler.codec.ByteToMessageDecoder:
COMPOSITE_CUMULATORMERGE_CUMULATOR

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
decode(ChannelHandlerContext ctx, Buffer
the Buffer from which to read data
in
)

Implements abstract io.netty5.handler.codec.ByteToMessageDecoder.decode.

Decode the from one Buffer to another.
Inherited from io.netty5.handler.codec.ByteToMessageDecoder:
actualReadableByteschannelInactivechannelReadchannelReadCompletechannelShutdowndecodeLastdiscardSomeReadByteshandlerAddedhandlerAdded0handlerRemovedhandlerRemoved0internalBufferisSharableisSingleDecodesetSingleDecode

Constructor Detail

HAProxyMessageDetectorback to summary
pack-priv HAProxyMessageDetector()

Method Detail

decodeback to summary
protected void decode(ChannelHandlerContext ctx, Buffer in)

Implements abstract io.netty5.handler.codec.ByteToMessageDecoder.decode.

Doc from io.netty5.handler.codec.ByteToMessageDecoder.decode.

Decode the from one Buffer to another. This method will be called till either the input Buffer has nothing to read when return from this method or till nothing was read from the input Buffer.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this ByteToMessageDecoder belongs to

in:Buffer

the Buffer from which to read data

Annotations
@Override