gobwas / ws

Tiny WebSocket library for Go.
MIT License
6.1k stars 373 forks source link

message rate limiter #195

Open carlosjpr-collab opened 8 months ago

carlosjpr-collab commented 8 months ago

Hi, Is any way or option to make a message rate limter in websocket server ? thanks

cristaloleg commented 8 months ago

Hey, you can use a custom TCP listener that controls how many active connection you have. By example https://pkg.go.dev/golang.org/x/net@v0.19.0/netutil#LimitListener