Begins an asynchronous request to disconnect from a remote endpoint.
- Parameters
-
reuse_socket | true if this socket can be reused after the connection is closed; otherwise, false. |
callback | The xtd::async_callback delegate. |
state | An object that contains state information for this request. |
- Returns
- An xtd::iasync_result that references the asynchronous connection.
- Exceptions
-
- 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.