3 ms·
Definitely going to take a look! I wanted to have the seemless movement to different PCs experience so that's why I can't read events directly from evdev. For e
by feschber 3y ago
Definitely going to take a look! I wanted to have the seemless movement to different PCs experience so that's why I can't read events directly from evdev. For emulating it would probably be quite useful! And maybe also in conjunction with the current methods...
As for encryption I'm planning to use https://crates.io/crates/webrtc-dtls https://crates.io/crates/webrtc-dtls.
Udp also has the advantage of not needing to reconnect, which already makes it possible to switch between Wi-Fi and Ethernet seamlessly.
- jvanderbot 3y agoAnother honest question. Given the availability of way better options like zmq, nng, etc, why do people still reach for raw udp/tcp? Maybe read this as "I recommend ..."
- feschber 3y agoudp is supported everywhere and also in the rust standard library as well as tokio. zmq and nng from what I can tell are both implemented on top of the transportation layer and use tcp under the hood. Udp also has other advantages besides speed. - Its session less, so any device going offline can simply come back online without needing to reestablish a tcp handshake. - The udp header is also substantially smaller than a tcp segment header (8 Bytes vs >= 20 Bytes). Not a huge difference but adds up to at least 12 KiB/s with a packet rate of 1000Hz and that is without the (potential) overhead of additional protocols like zmq or nng on top. In this particular scenario the reliability of tcp is also not really necessary in my opinion. I think overall it may be worth investigating if there is a noticeable difference.