Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
netty separator and the fixed-length channel decoder solution
Netty delimiter decoding
LengthFieldBasedFrameDecoder understand seconds
Note:
- Transmitting
byte[]
data byUnpooled.copiedBuffer()
the byte [] into the packageByteBuf
, and then sent - If the data is not received before a connection or a two receive data, the frame decoder is likely to be (. FrameDecoder) is provided with a problem.
- Separator The separator to the decoder as a terminator of data to determine, as a starting symbol is determined if you want two receive data before a need to look