tokio-rs / mio

Metal I/O library for Rust.
MIT License
6.17k stars 716 forks source link

Support for peek/peek_from for sockets (unix_socket_peek) #1418

Open cssivision opened 3 years ago

cssivision commented 3 years ago

missing peek/peek_from in UnixDatagram, which exist in standard library. I'm willing to fire a PR for this.

Thomasdezeeuw commented 3 years ago

This would be fine, but currently the API in standard library is unstable I see. Currently Mio wraps the std lib types, which could be a bit challenging. We don't really have a good story for additional API added after our minimum rust version, e.g. also see https://github.com/tokio-rs/mio/issues/977. Why we could introduce an "unstable" feature flag or something for this, any ideas?

cssivision commented 3 years ago

It's fine to introduce those methods when they become stable. so, close the issue now.

Thomasdezeeuw commented 3 years ago

Let's keep the issue open so we can track it.

Thomasdezeeuw commented 2 years ago

This depends on https://github.com/rust-lang/rust/issues/76923.