Struct mio::net::UnixListener [−][src]
pub struct UnixListener { /* fields omitted */ }
A non-blocking Unix domain socket server.
Implementations
impl UnixListener
[src]
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 FromRawFd 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 IntoRawFd for UnixListener
[src]