2 ms·
Some language APIs already have that capability, for example Rust (TcpStream::split() https://docs.rs/tokio/latest/tokio/net/struct.TcpStream.html#method.split
by remram 4y ago
Some language APIs already have that capability, for example Rust (TcpStream::split() https://docs.rs/tokio/latest/tokio/net/struct.TcpStream.html#method.split https://docs.rs/tokio/latest/tokio/net/struct.TcpStream.html...)
With the POSIX API, you can duplicate the socket file descriptor, but calling shutdown() to close one direction of a file descriptor will actually close that direction on all file descriptors... unfortunate.