MCPcopy Create free account
hub / github.com/3rdparty/libprocess / accept

Method accept

include/process/socket.hpp:357–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355 }
356
357 Future<Socket> accept()
358 {
359 // NOTE: We save a reference to the listening socket itself
360 // (i.e., 'this') so that we don't close the listening socket
361 // while 'accept' is in flight.
362 std::shared_ptr<SocketImpl> self = impl->shared_from_this();
363
364 return impl->accept()
365 // TODO(benh): Use && for `accepted` here!
366 .then([self](const std::shared_ptr<SocketImpl>& accepted) {
367 return Socket(accepted);
368 });
369 }
370
371 // NOTE: Calling this overload when `kind() == SSL` will result
372 // in program termination.

Callers

nothing calls this directly

Calls 2

SocketClass · 0.85
thenMethod · 0.45

Tested by

no test coverage detected