TODO(benh): Remove and defer to Socket::accept.
| 29 | |
| 30 | // TODO(benh): Remove and defer to Socket::accept. |
| 31 | inline 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. |
nothing calls this directly
no outgoing calls
no test coverage detected