MCPcopy Create free account
hub / github.com/COVESA/vsomeip / async_connect

Method async_connect

implementation/endpoints/src/local_socket_tcp_impl.cpp:118–125  ·  view source on GitHub ↗

to be unaware of the protocol, no endpoint definition is passed in

Source from the content-addressed store, hash-verified

116
117// to be unaware of the protocol, no endpoint definition is passed in
118void local_socket_tcp_impl::async_connect(connect_handler _handler) {
119 std::unique_lock lock{socket_mtx_};
120 if (socket_->is_open()) {
121 socket_->async_connect(peer_endpoint_, std::move(_handler));
122 } else {
123 boost::asio::post(io_context_, [h = std::move(_handler)] { h(boost::asio::error::fault); });
124 }
125}
126void local_socket_tcp_impl::async_receive(boost::asio::mutable_buffer _buffer, read_handler _r_handler) {
127 std::unique_lock lock{socket_mtx_};
128 if (socket_->is_open()) {

Callers

nothing calls this directly

Calls 1

is_openMethod · 0.45

Tested by

no test coverage detected