Allenxuxu / gev

🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
MIT License
1.73k stars 194 forks source link

feature: server option加入connection ringbuffer maxSize限制? #52

Closed rfyiamcool closed 3 years ago

rfyiamcool commented 3 years ago

有些弱网客户端消费太慢,导致推送端send()的数据一直堆积在socket缓冲区和ringbuffer缓冲区。

Allenxuxu commented 3 years ago

这个功能我觉得是需要的,我会尽快 commit。如果你感兴趣,也可以提 PR 。

Allenxuxu commented 3 years ago

https://github.com/Allenxuxu/gev/pull/54

Allenxuxu commented 3 years ago

54

提供了,获取当前 connection ringbuffer length 的接口,可以感知到ringbuffer 缓冲区的堆积,然后业务来处理降级。

rfyiamcool commented 3 years ago

感谢