Initializes a new instance of the xtd::net::sockets::udp_client class and establishes a default remote host.
- Parameters
-
hostname | The name of the remote DNS host to which you intend to connect. |
port | The remote port number to which you intend to connect. |
- Exceptions
-
- Note
- If you receive a xtd::net::sockets::socket_exception, use the xtd::net::sockets::socket_exception::error_code property to obtain the specific error code. After you have obtained this code, refer to the Windows Sockets version 2 API error code documentation in the MSDN library for a detailed description of the error.