Ends a pending asynchronous send.
- Parameters
-
async_result | An xtd::iasync_result that stores state information for this asynchronous operation as well as any user defined data. |
- Returns
- If successful, the number of bytes sent to the xtd::net::sockets::socket::socket; otherwise, an invalid xtd::net::sockets::socket::socket error.
- Exceptions
-
- 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.
-
All I/O initiated by a given thread is canceled when that thread exits. A pending asynchronous operation can fail if the thread exits before the operation completes.
-
The successful completion of a send does not indicate that the data was successfully delivered. If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in nonblocking mode.