Package io.netty.handler.codec.haproxy
Class HAProxyMessageDecoder.StructHeaderExtractor
java.lang.Object
io.netty.handler.codec.haproxy.HAProxyMessageDecoder.HeaderExtractor
io.netty.handler.codec.haproxy.HAProxyMessageDecoder.StructHeaderExtractor
- Enclosing class:
HAProxyMessageDecoder
private final class HAProxyMessageDecoder.StructHeaderExtractor
extends HAProxyMessageDecoder.HeaderExtractor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intdelimiterLength(ByteBuf buffer, int eoh) Get the length of the header delimiter.protected intfindEndOfHeader(ByteBuf buffer) Find the end of the header from the givenByteBuf,the end may be a CRLF, or the length given by the header.Methods inherited from class io.netty.handler.codec.haproxy.HAProxyMessageDecoder.HeaderExtractor
extract
-
Constructor Details
-
StructHeaderExtractor
StructHeaderExtractor(int maxHeaderSize)
-
-
Method Details
-
findEndOfHeader
Description copied from class:HAProxyMessageDecoder.HeaderExtractorFind the end of the header from the givenByteBuf,the end may be a CRLF, or the length given by the header.- Specified by:
findEndOfHeaderin classHAProxyMessageDecoder.HeaderExtractor- Parameters:
buffer- the buffer to be searched- Returns:
-1if can not find the end, otherwise return the buffer index of end
-
delimiterLength
Description copied from class:HAProxyMessageDecoder.HeaderExtractorGet the length of the header delimiter.- Specified by:
delimiterLengthin classHAProxyMessageDecoder.HeaderExtractor- Parameters:
buffer- the buffer where delimiter is locatedeoh- index of delimiter- Returns:
- length of the delimiter
-