layeh / gumble

gumble is a Mumble client implementation in Go (golang)
https://pkg.go.dev/mod/layeh.com/gumble
Mozilla Public License 2.0
172 stars 55 forks source link

Automatic rate limiting #47

Open ddevault opened 4 years ago

ddevault commented 4 years ago

https://github.com/mumble-voip/mumble/pull/3510

This patch added rate limiting to mumble upstream, which simply drops messages if they're sent too quickly. I ran into this while working on a bot and it took me a bit to figure out that this was the reason my messages were being dropped. It would be nice if gumble had built-in throttling.

ghost commented 4 years ago

Do you have any thoughts on the implementation? None of gumble's the sending methods currently have a return value.

ddevault commented 4 years ago

Maybe you could just accumulate messages to be sent into a queue, then flush them with a rate limit in the main loop of gumbleutil?

ghost commented 4 years ago

I see the rate limiting is also configurable (see https://github.com/mumble-voip/mumble/pull/3517), so I'm not sure how this could be done reliably on the client-side. I would like to see the server expose its rate limiting options to the client (similar to how the maximum audio bitrate is exposed), before a client-side rate limit is added inside of gumble.