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

◆ dont_fragment() [2/2]

socket & xtd::net::sockets::socket::dont_fragment ( bool  value)

Sets a value that specifies whether the xtd::net::sockets::socket allows Internet Protocol (IP) datagrams to be fragmented.

Parameters
valuetrue if the xtd::net::sockets::socket doesn't allow datagram fragmentation; otherwise, false. The default is true.
Returns
This current instance.
Exceptions
xtd::not_supported_exceptionThe socket is not in the xtd::net::sockets::address_family::inter_network family.
xtd::net::sockets::socket_exceptionAn error occurred when attempting to access the socket.
xtd::object_closed_exceptionThe xtd::net::sockets::socket has been closed.
Note
If you receive a xtd::net::sockets::socket_exception 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.