Close the socket. * This function is used to close the socket. Any asynchronous send, receive * or connect operations will be cancelled immediately, and will complete * with the asio::error::operation_aborted error. * * @throws asio::system_error Thrown on failure. Note that, even if * the function indicates an error, the underlying descriptor is closed. * * @note For portable
| 501 | * connected socket, call shutdown() before closing the socket. |
| 502 | */ |
| 503 | void close() |
| 504 | { |
| 505 | asio::error_code ec; |
| 506 | impl_.get_service().close(impl_.get_implementation(), ec); |
| 507 | asio::detail::throw_error(ec, "close"); |
| 508 | } |
| 509 | |
| 510 | /// Close the socket. |
| 511 | /** |
no test coverage detected