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 3.4 实现 WebSocket 服务。
我需要限制帧大小以避免帧非常长的 DoS 攻击。我希望在 32KB 数据后断开连接,即使该帧尚未完成且未传递给我的处理程序。
有没有办法做到这一点?
鉴于目前的代码,目前看起来并不像它。
您必须扩展 WebSocket08FrameDecoder 并更改toFrameLength().
toFrameLength()
如果有机会,我会为下一个版本提出拉取请求。