xtd::net::sockets::udp_client::sends a UDP datagram to the host at the specified remote endpoint.
- Parameters
-
dgram | An array of type Byte that specifies the UDP datagram that you intend to send, represented as an array of bytes. |
bytes | The number of bytes in the datagram. |
end_point | An xtd::net::ip_end_point that represents the host and port to which to send the datagram. |
- Returns
- The number of bytes sent.
- 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.