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

◆ end_disconnect()

void xtd::net::sockets::socket::end_disconnect ( xtd::sptr< xtd::iasync_result async_result)

Ends a pending asynchronous disconnect request.

Parameters
async_resultAn xtd::iasync_result that stores state information for this asynchronous operation as well as any user defined data.
Exceptions
argument_exceptionasyncResult was not returned by a call to the xtd::net::sockets::socket::begin_disconnect method.
xtd::net::sockets::socket_exceptionAn error occurred when attempting to access the socket.
xtd::object_closed_exceptionThe xtd::net::sockets::socket has been closed.
Remarks
xtd::net::sockets::socket::end_disconnect completes a call to xtd::net::sockets::socket::begin_disconnect. The xtd::net::sockets::socket::end_disconnect method blocks until the disconnect completes. For information about asynchronous operations, see Asynchronous Programming Model (APM).
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.