Open anotheros opened 2 years ago
你好, 我发现 websocket 在客户端发送数据过快的时候,服务器端会出现问题。
出现问题代码 在
应该是 github.com/gobwas/ws 在epoll 的下,读取数据导致的。
也许这个bug我该 提给 github.com/gobwas/ws 。
我看了一眼 https://github.com/gnet-io/gnet-examples/blob/v2/simple_protocol/protocol/proto.go 估计要想让 gnet完美支持 websocket ,需要自己写 codec 。
能具体描述下 bug 的表现吗?
运行这个 https://github.com/gnet-io/gnet-examples/pull/15 。即可复现。
应该是读取 websocket 帧的时候,读了一半。
你好, 我发现 websocket 在客户端发送数据过快的时候,服务器端会出现问题。
出现问题代码 在
应该是 github.com/gobwas/ws 在epoll 的下,读取数据导致的。
也许这个bug我该 提给 github.com/gobwas/ws 。
我看了一眼 https://github.com/gnet-io/gnet-examples/blob/v2/simple_protocol/protocol/proto.go 估计要想让 gnet完美支持 websocket ,需要自己写 codec 。