rustasync / runtime

Empowering everyone to build asynchronous software
https://docs.rs/runtime
Apache License 2.0
862 stars 28 forks source link

Escape hatches on network primitives #113

Closed vorner closed 4 years ago

vorner commented 5 years ago

The API surface of the network primitives here (eg. TcpListener) is somewhat limited (understandably). However, the standard library supports things like FromRawFd, other async libraries support things like from_std or connect_std (in tokio, though hidden from docs).

Because, eventually, one runs into needs that are not covered by the basic API and needs to go to either things like the net2 crate, or directly calling stuff like setsockopt (often before the socket is connected) to achieve them. Such circumstances include, for example:

Would it be possible to include such escape hatches here too?

yoshuawuyts commented 5 years ago

@vorner hey! -- this library is not actively under development anymore, and most of the team has moved onto building async-std instead. We've been able to get a lot further there than we did here; and among other things we have a working TcpListener::FromRawFd implementation :sparkles:.

We'll probably put up a notice on the repo soon directing people to use async-std and tokio respectively.

vorner commented 5 years ago

Thanks for letting me know, this means one less „backend“ to support for me. I know about the async-std :-).

As for the notice ‒ that would definitely help, knowing the state. Would it also be possible to release a version with it, so such notice gets onto crates.io and docs.rs?

yoshuawuyts commented 5 years ago

@vorner yep; will do!