xtd::net::sockets::udp_client::udp_client | ( | uint16 | port, |
xtd::net::sockets::address_family | addressFamily | ||
) |
Initializes a new instance of the xtd::net::sockets::udp_client class and binds it to the local port number provided.
port | The port on which to listen for incoming connection attempts. |
address_family | One of the xtd::net::sockets::address_family values that specifies the addressing scheme of the socket. |
xtd::argument_exception | family is not xtd::net::sockets::address_family::inter_network or xtd::net::sockets::address_family::inter_network_v6. |
xtd::net::sockets::socket_exception | An error occurred when attempting to access the underlying socket. |