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

Function accept

include/process/network.hpp:31–42  ·  view source on GitHub ↗

TODO(benh): Remove and defer to Socket::accept.

Source from the content-addressed store, hash-verified

29
30// TODO(benh): Remove and defer to Socket::accept.
31inline Try<int_fd> accept(int_fd s)
32{
33 sockaddr_storage storage;
34 socklen_t length = sizeof(storage);
35
36 int_fd accepted = net::accept(s, (sockaddr*) &storage, &length);
37 if (accepted < 0) {
38 return ErrnoError("Failed to accept");
39 }
40
41 return accepted;
42}
43
44
45// TODO(benh): Remove and defer to Socket::bind.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected