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

Function AcceptD

library/cpp/coroutine/engine/network.cpp:290–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289
290 int AcceptD(TCont* cont, SOCKET s, struct sockaddr* addr, socklen_t* addrlen, TInstant deadline) noexcept {
291 SOCKET ret;
292
293 while ((ret = Accept4(s, addr, addrlen)) == INVALID_SOCKET) {
294 int err = LastSystemError();
295
296 if (!IsBlocked(err)) {
297 return -err;
298 }
299
300 err = PollD(cont, s, CONT_POLL_READ, deadline);
301
302 if (err) {
303 return -err;
304 }
305 }
306
307 return (int) ret;
308 }
309
310 int AcceptT(TCont* cont, SOCKET s, struct sockaddr* addr, socklen_t* addrlen, TDuration timeout) noexcept {
311 return AcceptD(cont, s, addr, addrlen, timeout.ToDeadLine());

Callers 2

AcceptTFunction · 0.85
AcceptIFunction · 0.85

Calls 4

Accept4Function · 0.85
LastSystemErrorFunction · 0.85
IsBlockedFunction · 0.70
PollDFunction · 0.70

Tested by

no test coverage detected