Struct mio::net::UnixStream [−][src]
A non-blocking Unix stream socket.
Implementations
impl UnixStream
[src][−]
pub fn connect<P: AsRef<Path>>(path: P) -> Result<UnixStream>
[src][−]
Connects to the socket named by path
.
pub fn from_std(stream: UnixStream) -> UnixStreamⓘNotable traits for UnixStream
impl Read for UnixStreamimpl<'a> Read for &'a UnixStreamimpl Write for UnixStreamimpl<'a> Write for &'a UnixStream
[src][−]
Notable traits for UnixStream
impl Read for UnixStreamimpl<'a> Read for &'a UnixStreamimpl Write for UnixStreamimpl<'a> Write for &'a UnixStream
Creates a new UnixStream
from a standard net::UnixStream
.
This function is intended to be used to wrap a Unix stream from the standard library in the Mio equivalent. The conversion assumes nothing about the underlying stream; it is left up to the user to set it in non-blocking mode.
Note
The Unix stream here will not have connect
called on it, so it
should already be connected via some other means (be it manually, or
the standard library).
pub fn pair() -> Result<(UnixStream, UnixStream)>
[src][−]
Creates an unnamed pair of connected sockets.
Returns two UnixStream
s which are connected to each other.
pub fn local_addr(&self) -> Result<SocketAddr>
[src][−]
Returns the socket address of the local half of this connection.
pub fn peer_addr(&self) -> Result<SocketAddr>
[src][−]
Returns the socket address of the remote half of this connection.
pub fn take_error(&self) -> Result<Option<Error>>
[src][−]
Returns the value of the SO_ERROR
option.
pub fn shutdown(&self, how: Shutdown) -> Result<()>
[src][−]
Shuts down the read, write, or both halves of this connection.
This function will cause all pending and future I/O calls on the
specified portions to immediately return with an appropriate value
(see the documentation of Shutdown
).
Trait Implementations
impl AsRawFd for UnixStream
[src][+]
impl Debug for UnixStream
[src][+]
impl FromRawFd for UnixStream
[src][+]
impl IntoRawFd for UnixStream
[src][+]
impl Read for UnixStream
[src][+]
impl<'a> Read for &'a UnixStream
[src][+]
impl Source for UnixStream
[src][+]
impl Write for UnixStream
[src][+]
impl<'a> Write for &'a UnixStream
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for UnixStream
impl Send for UnixStream
impl Sync for UnixStream
impl Unpin for UnixStream
impl UnwindSafe for UnixStream
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,