MCPcopy Create free account
hub / github.com/Tencent/phxsql / IsNonBlock

Function IsNonBlock

phxsqlproxy/phxsqlproxyutil.cpp:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44bool IsNonBlock(int sock_fd) {
45 int flags;
46 flags = fcntl(sock_fd, F_GETFL, 0);
47 if (flags & O_NONBLOCK) {
48 return true;
49 }
50 return false;
51}
52
53int SetNonBlock(int sock_fd) {
54 int flags;

Callers 4

RoutineReadWithTimeoutFunction · 0.85
RoutineWriteWithTimeoutFunction · 0.85
RoutinePeekWithTimeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected