MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / accept

Method accept

src/ipc/asio_transport.cpp:172–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172AsioTransport AsioAcceptor::accept(std::chrono::milliseconds timeout) {
173 asio::ip::tcp::socket sock{io_context_};
174
175 bool done = false;
176 asio::error_code op_ec;
177 acceptor_.async_accept(sock, [&op_ec, &done](const asio::error_code& e) {
178 op_ec = e;
179 done = true;
180 });
181 if (run_until(io_context_, acceptor_, done, timeout) || op_ec) {
182 throw_socket_timeout_error("accept");
183 }
184
185 return AsioTransport{io_context_, std::move(sock), timeout};
186}
187
188} // namespace oid

Callers 3

wait_for_clientMethod · 0.80
ConnectSocketsMethod · 0.80
TESTFunction · 0.80

Calls 2

run_untilFunction · 0.85

Tested by 2

ConnectSocketsMethod · 0.64
TESTFunction · 0.64