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

◆ ttl() [1/2]

xtd::byte xtd::net::sockets::udp_client::ttl ( ) const

Gets a value that specifies the Time to Live (TTL) value of Internet Protocol (IP) packets sent by the xtd::net::sockets::udp_client.

Returns
The TTL value.
Exceptions
xtd::net::sockets::socket_exceptionAn error occurred when attempting to access the underlying socket.
xtd::object_closed_exceptionThe underlying xtd::net::sockets::socket has been closed.
Remarks
The TTL value indicates the maximum number of routers a packet can traverse before the router discards the packet and an Internet Control Message Protocol (ICMP) "TTL exceeded" error message is returned to the sender.
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.