pub trait Listener: AsSockRef {
type Socket: AsSockRef + Read + Write + Into<Socket>;
type Address: Debug;
// Required methods
fn accept(&self) -> Result<(Self::Socket, Self::Address)>;
fn local_addr(&self) -> Result<Self::Address>;
}
Expand description
Trait for listening sockets.
Required Associated Types§
Required Methods§
sourcefn local_addr(&self) -> Result<Self::Address>
fn local_addr(&self) -> Result<Self::Address>
Returns the local address of the listener.