doc.rust-lang.org
pub fn connect_addr(socket_addr: &SocketAddr) -> io::Result<UnixStream>
Connects to the socket specified by address.
associated_function
std
Stable since 1.70.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn connect<P>(path: P) -> io::Result<UnixStream>
Connects to the socket named by path.
associated_function
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct UnixStream
A Unix stream socket.
struct
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone(&self) -> io::Result<UnixListener>
Creates a new independently owned handle to the underlying socket.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn take_error(&self) -> io::Result<Option<io::Error>>
Returns the value of the SO_ERROR option.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()>
Moves the socket into or out of nonblocking mode.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn local_addr(&self) -> io::Result<SocketAddr>
Returns the local socket address of this listener.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn incoming(&self) -> Incoming<'_>
Returns an iterator over incoming connections.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixListener>
Creates a new UnixListener bound to the specified socket address.
associated_function
std
Stable since 1.70.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn bind<P>(path: P) -> io::Result<UnixListener>
Creates a new UnixListener bound to the specified socket.
associated_function
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn accept(&self) -> io::Result<(UnixStream, SocketAddr)>
Accepts a new incoming connection to this listener.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct UnixListener
A structure representing a Unix domain socket server.
struct
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Incoming<'a>
An iterator over incoming connections to a UnixListener.
struct
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn write_timeout(&self) -> io::Result<Option<Duration>>
Returns the write timeout of this socket.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn unbound() -> io::Result<UnixDatagram>
Creates a Unix Datagram socket which is not bound to any address.
associated_function
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone(&self) -> io::Result<UnixDatagram>
Creates a new independently owned handle to the underlying socket.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn take_error(&self) -> io::Result<Option<io::Error>>
Returns the value of the SO_ERROR option.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn shutdown(&self, how: Shutdown) -> io::Result<()>
Shut down the read, write, or both halves of this connection.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_write_timeout(&self, timeout: Option<Duration>) -> io::Result<()>
Sets the write timeout for the socket.
method
std
Stable since 1.10.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_read_timeout(&self, timeout: Option<Duration>) -> io::Result<()>
Sets the read timeout for the socket.
method
std
Stable since 1.10.0
Version 1.100.0-nightly