MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / tcp_set_nonblocking

Function tcp_set_nonblocking

extra/yassl/testsuite/test.hpp:328–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326
327
328inline void tcp_set_nonblocking(SOCKET_T& sockfd)
329{
330#ifdef NON_BLOCKING
331 #ifdef _WIN32
332 unsigned long blocking = 1;
333 int ret = ioctlsocket(sockfd, FIONBIO, &blocking);
334 #else
335 int flags = fcntl(sockfd, F_GETFL, 0);
336 int ret = fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
337 #endif
338#endif
339}
340
341
342inline void tcp_socket(SOCKET_T& sockfd, SOCKADDR_IN_T& addr)

Callers 2

client_testFunction · 0.85
tcp_acceptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected