Struct asyncio::SocketListener
[−]
[src]
pub struct SocketListener<P: Protocol, S: FromRawFd<P>> { /* fields omitted */ }
Provides an ability to accept new connections.
Methods
impl<P: Protocol, S: FromRawFd<P>> SocketListener<P, S>
[src]
fn new(io: &IoService, pro: P) -> Result<SocketListener<P, S>>
fn accept(&self) -> Result<(S, P::Endpoint)>
fn async_accept<F>(&self, handler: F) -> F::Output where F: Handler<(S, P::Endpoint)>
fn bind(&self, ep: &P::Endpoint) -> Result<()>
fn cancel(&self)
fn listen(&self) -> Result<()>
fn local_endpoint(&self) -> Result<P::Endpoint>
fn io_control<T>(&self, cmd: &mut T) -> Result<()> where T: IoControl
fn get_non_blocking(&self) -> Result<bool>
fn get_option<C>(&self) -> Result<C> where C: GetSocketOption<P>
fn protocol(&self) -> P
fn set_non_blocking(&self, on: bool) -> Result<()>
fn set_option<C>(&self, cmd: C) -> Result<()> where C: SetSocketOption<P>
Trait Implementations
impl<P: Protocol, S: FromRawFd<P>> IoObject for SocketListener<P, S>
[src]
fn io_service(&self) -> &IoService
Returns a IoService
associated with this object.