[−][src]Module tokio::net::unix::split
UnixStream
split support.
A UnixStream
can be split into a read half and a write half with UnixStream::split
and UnixStream::split_mut
methods. The read half implements AsyncRead
while
the write half implements AsyncWrite
. The two halves can be used concurrently.
Compared to the generic split of AsyncRead + AsyncWrite
, this specialized
split gives read and write halves that are faster and smaller, because they
do not use locks. They also provide access to the underlying UnixStream
after split, implementing AsRef<UnixStream>
. This allows you to call
UnixStream
methods that takes &self
, e.g., to get local and peer
addresses, to get and set socket options, and to shutdown the sockets.
Structs
UnixStreamReadHalf | Read half of a |
UnixStreamReadHalfMut | Read half of a |
UnixStreamWriteHalf | Write half of a |
UnixStreamWriteHalfMut | Write half of a |