ShadowJonathan / DusTLS

Pure-Rust DTLS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Robust router for UDP

ShadowJonathan opened this issue · comments

While #1 provides a general API that is agnostic across all transports, I think it would be helpful for applications to have a "hit the ground running" UDP router which could take the task on polling and multiplexing the transport layer in their own way, via STD UDPsockets.

Because of this, I'll probably want to make this a separate crate (because of #5).

I also want to mention https://github.com/shadowjonathan/exit-left here, which would allow a thread-based blocking polling mechanism which only allows one threading reading the socket at any time, routing the results to the right waiting thread.

I could possibly supply an async solution in the future as well.

The main motivation for this is to prevent mistakes in applications, as else they'd have to re-implement the same router for every application, which could introduce data loss or vulnerabilities/problems.