tormol / uds

A unix domain sockets Rust library
Apache License 2.0
19 stars 8 forks source link

Tokio support #1

Closed jmagnuson closed 3 years ago

jmagnuson commented 4 years ago

Thanks for the useful crate. Has there been any consideration given for building optional tokio functionality? Something like:

pub struct UnixSeqpacketConn {
    io: PollEvented<crate::nonblocking::UnixSeqpacketConn>,
}

and then impls various tokio-related traits for async support. I got a POC working for AsyncRead/AsyncWrite, but it's far from comprehensive and I'm not sure how it would fit within this crate. Curious to hear what the thoughts are.

tormol commented 4 years ago

Optional tokio integration is something I'd planned to eventually add! I don't yet know how tokio works under the hood, so thanks for adding it. Covering only basic seqpacket features is ok. fd-passing can be added later.