to be unaware of the protocol, no endpoint definition is passed in
| 116 | |
| 117 | // to be unaware of the protocol, no endpoint definition is passed in |
| 118 | void 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 | } |
| 126 | void 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()) { |