udp-dtls
udp-dtls copied to clipboard
tokio based async support
Meanwhile, I created a prototype for tokio/async support. It seems to work in my setup (in combination with rust-async-coap). But it's far from being final.
What do you think?
- I will explore more if it will be possible to support both tokio and async-std
- support for acceptors, examples and yet to come. What is in there, is just the initial version.
If we implement futures::Stream
for some stream, then the user is able to use either async-std or tokio. We do not have to support the runtime right?
async example is now in examples/
Right now, it would be difficult to get rid of tokio dependency because we strongly depend on tokio-openssl, which, in turn, depends on tokio. This dependency is not very significant, since the only things it takes from tokio are AsyncRead, AsyncWrite, which have their counterparties in futures::io.
Perhaps it should be possible to convince the tokio-openssl author to make his library more neutral.
aha, this is was already discussed. So I would wait until futures-openssl will be available.
https://github.com/alexcrichton/tokio-openssl/issues/12