pub trait Listener: AsRawFd + Sync + Send {
type Connection: AsRawFd + Send;
fn accept(&self) -> Result<Self::Connection>;
}
Expand description
Types that implement Listener
are mio-pollable, and can accept new connections that are
themselves mio-pollable.
Required Associated Types§
sourcetype Connection: AsRawFd + Send
type Connection: AsRawFd + Send
The type of connections yielded by accept
.
Required Methods§
sourcefn accept(&self) -> Result<Self::Connection>
fn accept(&self) -> Result<Self::Connection>
Accept a new connection.
This method will only be called when mio::Ready::readable
is raised for the Listener
by
a poll
.