MCPcopy Create free account
hub / github.com/defold/defold / WaitForRawSocketReadable

Function WaitForRawSocketReadable

engine/dlib/src/test/test_sslsocket.cpp:107–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107static bool WaitForRawSocketReadable(dmSocket::Socket socket, uint64_t timeout)
108{
109 dmSocket::Selector selector;
110 dmSocket::SelectorZero(&selector);
111 dmSocket::SelectorSet(&selector, dmSocket::SELECTOR_KIND_READ, socket);
112 dmSocket::Result select_result = dmSocket::Select(&selector, timeout);
113 return select_result == dmSocket::RESULT_OK && dmSocket::SelectorIsSet(&selector, dmSocket::SELECTOR_KIND_READ, socket);
114}
115
116// The SSL socket API must preserve nonblocking socket semantics. The Apple
117// CFStream backend used to call CFReadStreamRead directly here, which can block

Callers 1

TESTFunction · 0.85

Calls 4

SelectorZeroFunction · 0.85
SelectorSetFunction · 0.85
SelectorIsSetFunction · 0.85
SelectFunction · 0.50

Tested by

no test coverage detected