Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何让 netty 小心缓冲数据,直到它接收到分隔符(仅限“\r”!),即它必须忽略“\r\n”,然后将其分派给 ChannelPipeline 中的下一个处理程序。可以用 DelimiterBasedFrameDecoder 完成吗?谢谢
您需要编写自己的解码器,它应该扩展 FrameDecoder。只需查看 FrameDecoder 的 javadocs 以了解如何实现它