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

Function assign

include/boost/asio/basic_socket.hpp:465–472  ·  view source on GitHub ↗

Assign an existing native socket to the socket. * This function opens the socket to hold an existing native socket. * * @param protocol An object specifying which protocol is to be used. * * @param native_socket A native socket. * * @throws boost::system::system_error Thrown on failure. */

Source from the content-addressed store, hash-verified

463 * @throws boost::system::system_error Thrown on failure.
464 */
465 void assign(const protocol_type& protocol,
466 const native_handle_type& native_socket)
467 {
468 boost::system::error_code ec;
469 impl_.get_service().assign(impl_.get_implementation(),
470 protocol, native_socket, ec);
471 boost::asio::detail::throw_error(ec, "assign");
472 }
473
474 /// Assign an existing native socket to the socket.
475 /*

Callers

nothing calls this directly

Calls 2

throw_errorFunction · 0.85
assignMethod · 0.45

Tested by

no test coverage detected