MCPcopy Create free account
hub / github.com/apache/mesos / accept

Method accept

3rdparty/libprocess/include/process/socket.hpp:363–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

SocketClass · 0.85
thenMethod · 0.45

Tested by

no test coverage detected