MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / connect

Function connect

3rd/asio-1.24.0/include/asio/basic_socket.hpp:853–864  ·  view source on GitHub ↗

Connect the socket to the specified endpoint. * This function is used to connect a socket to the specified remote endpoint. * The function call will block until the connection is successfully made or * an error occurs. * * The socket is automatically opened if it is not already open. If the * connect fails, and the socket was automatically opened, the socket is * not returned to

Source from the content-addressed store, hash-verified

851 * @endcode
852 */
853 void connect(const endpoint_type& peer_endpoint)
854 {
855 asio::error_code ec;
856 if (!is_open())
857 {
858 impl_.get_service().open(impl_.get_implementation(),
859 peer_endpoint.protocol(), ec);
860 asio::detail::throw_error(ec, "connect");
861 }
862 impl_.get_service().connect(impl_.get_implementation(), peer_endpoint, ec);
863 asio::detail::throw_error(ec, "connect");
864 }
865
866 /// Connect the socket to the specified endpoint.
867 /**

Callers 3

thread_pool.hppFile · 0.70
connect_to_endpointsMethod · 0.70
MakeConnectionMethod · 0.50

Calls 5

throw_errorFunction · 0.85
is_openFunction · 0.70
openMethod · 0.45
protocolMethod · 0.45
connectMethod · 0.45

Tested by 1

MakeConnectionMethod · 0.40