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

Method start

example/cpp11/timeouts/async_tcp_client.cpp:98–108  ·  view source on GitHub ↗

Called by the user of the client class to initiate the connection process. The endpoints will have been obtained using a tcp::resolver.

Source from the content-addressed store, hash-verified

96 // Called by the user of the client class to initiate the connection process.
97 // The endpoints will have been obtained using a tcp::resolver.
98 void start(tcp::resolver::results_type endpoints)
99 {
100 // Start the connect actor.
101 endpoints_ = endpoints;
102 start_connect(endpoints_.begin());
103
104 // Start the deadline actor. You will note that we're not setting any
105 // particular deadline here. Instead, the connect and input actors will
106 // update the deadline prior to each asynchronous operation.
107 deadline_.async_wait(std::bind(&client::check_deadline, this));
108 }
109
110 // This function terminates all the actors to shut down the connection. It
111 // may be called by the user of the client class, or by the class itself in

Callers 1

mainFunction · 0.45

Calls 3

bindFunction · 0.50
beginMethod · 0.45
async_waitMethod · 0.45

Tested by

no test coverage detected