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

◆ send_timeout() [1/2]

int32 xtd::net::sockets::socket::send_timeout ( ) const

Gets a value that specifies the amount of time after which a synchronous xtd::net::sockets::socket::send call will time out.

Returns
The time-out value, in milliseconds. If you set the property with a value between 1 and 499, the value will be changed to 500. The default value is 0, which indicates an infinite time-out period. Specifying -1 also indicates an infinite time-out period.
Exceptions
xtd::net::sockets::socket_exceptionThis option is valid for a datagram socket only.
xtd::object_closed_exceptionThe xtd::net::sockets::socket has been closed.
Remarks
This option applies to synchronous Send calls only. If the time-out period is exceeded, the Send method will throw a xtd::net::sockets::socket::socket_exception.
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.