MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / checkCanWrite

Method checkCanWrite

libapp2sys/src/main/cpp/localsocket.h:57–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57 static int checkCanWrite(int fd) {
58 fd_set fdset;
59 FD_ZERO(&fdset);
60 FD_SET(fd, &fdset);
61 struct timeval timeout;
62 timeout.tv_sec = 0;
63 timeout.tv_usec = 0;
64 select(fd + 1, NULL, &fdset, NULL, &timeout);
65 pdbg("checkCanWrite FD_ISSET(fd, &fdset):%d, fd:%d", FD_ISSET(fd, &fdset), fd);
66 return FD_ISSET(fd, &fdset);
67 }
68
69
70 int socketAccept(int fd) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected