| 98 | } |
| 99 | |
| 100 | inline int Socket_PollWriteable(SOCKET fd, struct timeval* tv) |
| 101 | { |
| 102 | int timeout = tv ? (tv->tv_sec * 1000 + tv->tv_usec / 1000) : -1; |
| 103 | pollfd pfd; |
| 104 | pfd.fd = fd; |
| 105 | pfd.events = POLLOUT; |
| 106 | return poll(&pfd, 1, timeout); |
| 107 | } |
| 108 | |
| 109 | |
| 110 | #define SOCKET_ERROR_CODE(e) e |