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

Function MsgPeek

util/network/socket.cpp:516–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514};
515
516static int MsgPeek(SOCKET s) {
517 int flags = MSG_PEEK;
518
519#if defined(_win_)
520 TUnblockingGuard unblocker(s);
521 Y_UNUSED(unblocker);
522#else
523 flags |= MSG_DONTWAIT;
524#endif
525
526 char c;
527 return recv(s, &c, 1, flags);
528}
529
530bool IsNotSocketClosedByOtherSide(SOCKET s) {
531 return HasSocketDataToRead(s) != ESocketReadStatus::SocketClosed;

Callers 1

HasSocketDataToReadFunction · 0.85

Calls 1

Y_UNUSEDFunction · 0.85

Tested by

no test coverage detected