Struct mio::net::UnixListener[][src]

pub struct UnixListener { /* fields omitted */ }

A non-blocking Unix domain socket server.

Implementations

impl UnixListener[src]

pub fn bind<P: AsRef<Path>>(path: P) -> Result<UnixListener>[src]

Creates a new UnixListener bound to the specified socket.

pub fn from_std(listener: UnixListener) -> UnixListener[src]

Creates a new UnixListener from a standard net::UnixListener.

This function is intended to be used to wrap a Unix listener from the standard library in the Mio equivalent. The conversion assumes nothing about the underlying listener; it is left up to the user to set it in non-blocking mode.

pub fn accept(&self) -> Result<(UnixStream, SocketAddr)>[src]

Accepts a new incoming connection to this listener.

The call is responsible for ensuring that the listening socket is in non-blocking mode.

pub fn local_addr(&self) -> Result<SocketAddr>[src]

Returns the local socket address of this listener.

pub fn take_error(&self) -> Result<Option<Error>>[src]

Returns the value of the SO_ERROR option.

Trait Implementations

impl AsRawFd for UnixListener[src]

impl Debug for UnixListener[src]

impl FromRawFd for UnixListener[src]

unsafe fn from_raw_fd(fd: RawFd) -> UnixListener[src]

Converts a RawFd to a UnixListener.

Notes

The caller is responsible for ensuring that the socket is in non-blocking mode.

impl IntoRawFd for UnixListener[src]

impl Source for UnixListener[src]

Auto Trait Implementations

impl RefUnwindSafe for UnixListener

impl Send for UnixListener

impl Sync for UnixListener

impl Unpin for UnixListener

impl UnwindSafe for UnixListener

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.