| 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected