OwnedSocket in std::os::windows::io - Rust (original) (raw)
Struct OwnedSocket
1.63.0 · Source
pub struct OwnedSocket { /* private fields */ }
Available on Windows only.
Expand description
An owned socket.
This closes the socket on drop.
This uses repr(transparent)
and has the representation of a host socket, so it can be used in FFI in places where a socket is passed as a consumed argument or returned as an owned value, and it never has the valueINVALID_SOCKET
.
1.63.0 · Source
Creates a new OwnedSocket
instance that shares the same underlying object as the existing OwnedSocket
instance.