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

Function HasSocketDataToRead

util/network/socket.cpp:534–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534ESocketReadStatus HasSocketDataToRead(SOCKET s) {
535 const int r = MsgPeek(s);
536 if (r == -1 && IsBlocked(LastSystemError())) {
537 return ESocketReadStatus::NoData;
538 }
539 if (r > 0) {
540 return ESocketReadStatus::HasData;
541 }
542 return ESocketReadStatus::SocketClosed;
543}
544
545#if defined(_win_)
546static ssize_t DoSendMsg(SOCKET sock, const struct iovec* iov, int iovcnt) {

Callers 1

Calls 3

MsgPeekFunction · 0.85
LastSystemErrorFunction · 0.85
IsBlockedFunction · 0.70

Tested by

no test coverage detected