MCPcopy Create free account
hub / github.com/catboost/catboost / FastAccept

Method FastAccept

util/network/nonblock.cpp:53–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 1

Accept4Function · 0.80

Calls 2

Accept4Function · 0.85
SetNonBlockFunction · 0.85

Tested by

no test coverage detected