boost::corosio::tcp_socket::native_handle

Get the native socket handle.

Synopsis

native_handle_type
native_handle() const noexcept;

Description

Returns the underlying platform‐specific socket descriptor. On POSIX systems this is an int file descriptor. On Windows this is a SOCKET handle.

Preconditions

None. May be called on closed sockets.

Return Value

The native socket handle, or ‐1/INVALID_SOCKET if not open.

Created with MrDocs