Trait std::os::windows::io::IntoRawSocket

1.4.0 · source ·
pub trait IntoRawSocket {
    fn into_raw_socket(self) -> RawSocket;
Available on Windows only.
Expand description

A trait to express the ability to consume an object and acquire ownership of its raw SOCKET.

Required Methods§

Consumes this object, returning the raw underlying socket.

This function is typically used to transfer ownership of the underlying socket to the caller. When used in this way, callers are then the unique owners of the socket and must close it once it’s no longer needed.

However, transferring ownership is not strictly required. Use a Into<OwnedSocket>::into implementation for an API which strictly transfers ownership.