MCPcopy Create free account
hub / github.com/chen3feng/toft / WaitReadable

Method WaitReadable

system/net/socket.cpp:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134#endif
135
136bool Socket::WaitReadable(struct timeval* tv, bool restart)
137{
138 for (;;)
139 {
140 int n = Socket_PollReadable(Handle(), tv);
141 if (n != SOCKET_ERROR_RETURN)
142 {
143 return n > 0;
144 }
145 else if (!IsInterruptedAndRestart(restart))
146 {
147 CheckError(n, "WaitReadable");
148 break;
149 }
150 }
151 return false;
152}
153
154bool Socket::WaitWriteable(struct timeval* tv, bool restart)
155{

Callers 1

TEST_FFunction · 0.80

Calls 1

Socket_PollReadableFunction · 0.85

Tested by 1

TEST_FFunction · 0.64