Long story short I’m debating rewriting my RTMP live streaming server and client from Elixir into Rust. The only way this makes sense (for my goals at least) is to take advantage of a networking event loop, meaning mio or tokio.
When a live streaming client or server sends video it needs to keep things as real time as possible, and it does this by dropping audio and video packets if the socket’s buffer is full (as opposed to waiting for the socket to be available to send again). This occurs when the connection between a client and a server degrades and cannot handle the bandwidth required for the live video (whether temporarily or permanently).
Is there a way to detect this situation in mio and/or tokio?