| 51 | } |
| 52 | |
| 53 | inline SOCKET FastAccept(SOCKET s, struct sockaddr* addr, socklen_t* addrlen) const { |
| 54 | #if defined(SOCK_NONBLOCK) |
| 55 | if (Accept4) { |
| 56 | return Accept4(s, addr, addrlen, SOCK_NONBLOCK); |
| 57 | } |
| 58 | #endif |
| 59 | |
| 60 | const SOCKET ret = accept(s, addr, addrlen); |
| 61 | |
| 62 | #if !defined(_freebsd_) |
| 63 | // freebsd inherit O_NONBLOCK flag |
| 64 | if (ret != INVALID_SOCKET) { |
| 65 | SetNonBlock(ret); |
| 66 | } |
| 67 | #endif |
| 68 | |
| 69 | return ret; |
| 70 | } |
| 71 | |
| 72 | inline SOCKET FastSocket(int domain, int type, int protocol) const { |
| 73 | #if defined(SOCK_NONBLOCK) |
no test coverage detected