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

Function SetNonBlock

phxsqlproxy/phxsqlproxyutil.cpp:53–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53int SetNonBlock(int sock_fd) {
54 int flags;
55 flags = fcntl(sock_fd, F_GETFL, 0);
56 flags |= O_NONBLOCK;
57 flags |= O_NDELAY;
58 int ret = fcntl(sock_fd, F_SETFL, flags);
59 return ret;
60}
61
62int SetAddr(const char * ip_string, const unsigned short port, struct sockaddr_in & addr) {
63 bzero(&addr, sizeof(addr));

Callers 4

runMethod · 0.85
ConnectionDispatcherMethod · 0.85
runMethod · 0.85
ConnectDestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected