MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / setNativeBlocking

Function setNativeBlocking

source/kernel/knativesocket.cpp:170–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void setNativeBlocking(int nativeSocket, bool blocking) {
171#ifdef WIN32
172 u_long mode = blocking?0:1;
173 ioctlsocket(nativeSocket, FIONBIO, &mode);
174#else
175 if (blocking)
176 fcntl(nativeSocket, F_SETFL, fcntl(nativeSocket, F_GETFL, 0) & ~O_NONBLOCK);
177 else
178 fcntl(nativeSocket, F_SETFL, fcntl(nativeSocket, F_GETFL, 0) | O_NONBLOCK);
179#endif
180}
181
182#ifdef BOXEDWINE_MULTI_THREADED
183static int checkWaitingNativeSockets_thread(void *ptr) {

Callers 4

startNativeSocketsThreadFunction · 0.85
KNativeSocketObjectMethod · 0.85
setBlockingMethod · 0.85
acceptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected