Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tencent/libco
/ SetNonBlock
Function
SetNonBlock
example_poll.cpp:50–59 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
48
};
49
50
static int SetNonBlock(int iSock)
51
{
52
int iFlags;
53
54
iFlags = fcntl(iSock, F_GETFL, 0);
55
iFlags |= O_NONBLOCK;
56
iFlags |= O_NDELAY;
57
int ret = fcntl(iSock, F_SETFL, iFlags);
58
return ret;
59
}
60
61
62
Callers
1
poll_routine
Function · 0.70
Calls
1
fcntl
Function · 0.85
Tested by
no test coverage detected