Trait uds::UnixListenerExt
source · [−]pub trait UnixListenerExt: AsRawFd + FromRawFd + Sized {
type Conn: FromRawFd;
fn bind_unix_addr(on: &UnixSocketAddr) -> Result<Self, Error>;
fn accept_unix_addr(&self) -> Result<(Self::Conn, UnixSocketAddr), Error>;
fn local_unix_addr(&self) -> Result<UnixSocketAddr, Error> { ... }
}
Expand description
Extension trait for using UnixSocketAddr
with UnixListener
types.
Required Associated Types
Required Methods
sourcefn bind_unix_addr(on: &UnixSocketAddr) -> Result<Self, Error>
fn bind_unix_addr(on: &UnixSocketAddr) -> Result<Self, Error>
Creates a socket bound to a UnixSocketAddr
and starts listening on it.
sourcefn accept_unix_addr(&self) -> Result<(Self::Conn, UnixSocketAddr), Error>
fn accept_unix_addr(&self) -> Result<(Self::Conn, UnixSocketAddr), Error>
Accepts a connection and returns the client’s address as
an uds::UnixSocketAddr
.
Provided Methods
sourcefn local_unix_addr(&self) -> Result<UnixSocketAddr, Error>
fn local_unix_addr(&self) -> Result<UnixSocketAddr, Error>
Returns the address this socket is listening on.