xtd 0.2.0
Loading...
Searching...
No Matches

◆ socket() [2/5]

xtd::net::sockets::socket::socket ( intptr  handle)
explicit

Initializes a new instance of the xtd::net::sockets::socket class for the specified socket handle.

Parameters
handleThe socket handle for the socket that the xtd::net::sockets::socket object will encapsulate.
Exceptions
xtd::argument_exceptionThe handle is invalid.
Remarks
This method populates the xtd::net::sockets::socket instance with data gathered from the supplied intptr. Different operating systems provide varying levels of support for querying a socket handle or file descriptor for its properties and configuration. Some of the public APIs on the resulting xtd::net::sockets::socket instance may differ based on operating system, such as xtd::net::sockets::socket::protocol_type and xtd::net::sockets::socket::blocking.