udp-dtls icon indicating copy to clipboard operation
udp-dtls copied to clipboard

tokio based async support

Open aav opened this issue 5 years ago • 5 comments

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 avatar Jan 06 '20 00:01 aav

  • 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.

aav avatar Jan 10 '20 16:01 aav

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?

TimonPost avatar Jan 11 '20 12:01 TimonPost

async example is now in examples/

aav avatar Jan 21 '20 23:01 aav

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 avatar Jan 21 '20 23:01 aav

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

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

aav avatar Jan 21 '20 23:01 aav