pub struct SocketListener<P, S> { /* private fields */ }
Expand description
Provides an ability to accept new connections.
Implementations§
Source§impl<P: Protocol, S: Socket<P>> SocketListener<P, S>
impl<P: Protocol, S: Socket<P>> SocketListener<P, S>
pub fn new(ctx: &IoContext, pro: P) -> Result<SocketListener<P, S>>
pub fn accept(&self) -> Result<(S, P::Endpoint)>
pub fn async_accept<F>(&self, handler: F) -> F::Output
pub fn bind(&self, ep: &P::Endpoint) -> Result<()>
pub fn cancel(&self) -> &Self
pub fn listen(&self) -> Result<()>
pub fn local_endpoint(&self) -> Result<P::Endpoint>
pub fn io_control<T>(&self, cmd: &mut T) -> Result<()>where
T: IoControl,
pub fn get_non_blocking(&self) -> Result<bool>
pub fn get_option<C>(&self) -> Result<C>where
C: GetSocketOption<P>,
pub fn set_non_blocking(&self, on: bool) -> Result<()>
pub fn set_option<C>(&self, cmd: C) -> Result<()>where
C: SetSocketOption<P>,
Trait Implementations§
Source§impl<P, S> AsIoContext for SocketListener<P, S>
impl<P, S> AsIoContext for SocketListener<P, S>
Source§impl<P, S> AsRawFd for SocketListener<P, S>
impl<P, S> AsRawFd for SocketListener<P, S>
Source§impl<P: Protocol, S> Debug for SocketListener<P, S>
impl<P: Protocol, S> Debug for SocketListener<P, S>
Source§impl<P: Protocol, S: Socket<P>> Socket<P> for SocketListener<P, S>
impl<P: Protocol, S: Socket<P>> Socket<P> for SocketListener<P, S>
unsafe fn from_raw_fd( ctx: &IoContext, pro: P, fd: RawFd, ) -> SocketListener<P, S>
fn protocol(&self) -> P
impl<P, S> Send for SocketListener<P, S>
Auto Trait Implementations§
impl<P, S> Freeze for SocketListener<P, S>where
P: Freeze,
impl<P, S> !RefUnwindSafe for SocketListener<P, S>
impl<P, S> !Sync for SocketListener<P, S>
impl<P, S> Unpin for SocketListener<P, S>
impl<P, S> !UnwindSafe for SocketListener<P, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more