TimonPost / udp-dtls

DTLS abstraction ontop of UDP
MIT License
15 stars 4 forks source link

tokio based async support #3

Open aav opened 4 years ago

aav commented 4 years ago

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?

aav commented 4 years ago
TimonPost commented 4 years ago

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?

aav commented 4 years ago

async example is now in examples/

aav commented 4 years ago

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.

aav commented 4 years ago

aha, this is was already discussed. So I would wait until futures-openssl will be available.

https://github.com/alexcrichton/tokio-openssl/issues/12