Struct asyncio::SocketListener
[−]
[src]
pub struct SocketListener<P, S> { /* fields omitted */ }
Provides an ability to accept new connections.
Methods
impl<P: Protocol, S: Socket<P>> SocketListener<P, S>
[src]
fn new(ctx: &IoContext, 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), Error>
fn bind(&self, ep: &P::Endpoint) -> Result<()>
fn cancel(&self) -> &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 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> Debug for SocketListener<P, S>
[src]
impl<P, S> AsRawFd for SocketListener<P, S>
[src]
impl<P, S> Send for SocketListener<P, S>
[src]
impl<P, S> AsIoContext for SocketListener<P, S>
[src]
impl<P: Protocol, S: Socket<P>> Socket<P> for SocketListener<P, S>
[src]
unsafe fn from_raw_fd(ctx: &IoContext,
pro: P,
fd: RawFd)
-> SocketListener<P, S>
pro: P,
fd: RawFd)
-> SocketListener<P, S>