MCPcopy Create free account
hub / github.com/boostorg/asio / close

Function close

include/boost/asio/basic_socket.hpp:510–515  ·  view source on GitHub ↗

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 boost::asio::error::operation_aborted error. * * @throws boost::system::system_error Thrown on failure. Note that, even if * the function indicates an error, the underlying descriptor is closed. * * @n

Source from the content-addressed store, hash-verified

508 * connected socket, call shutdown() before closing the socket.
509 */
510 void close()
511 {
512 boost::system::error_code ec;
513 impl_.get_service().close(impl_.get_implementation(), ec);
514 boost::asio::detail::throw_error(ec, "close");
515 }
516
517 /// Close the socket.
518 /**

Callers

nothing calls this directly

Calls 2

throw_errorFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected