-------------------------------------------------------------------------*\ * Select with int timeout in ms \*-------------------------------------------------------------------------*/
| 82 | * Select with int timeout in ms |
| 83 | \*-------------------------------------------------------------------------*/ |
| 84 | int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, |
| 85 | p_timeout tm) { |
| 86 | struct timeval tv; |
| 87 | double t = timeout_get(tm); |
| 88 | tv.tv_sec = (int) t; |
| 89 | tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); |
| 90 | if (n <= 0) { |
| 91 | Sleep((DWORD) (1000*t)); |
| 92 | return 0; |
| 93 | } else return select(0, rfds, wfds, efds, t >= 0.0? &tv: NULL); |
| 94 | } |
| 95 | |
| 96 | /*-------------------------------------------------------------------------*\ |
| 97 | * Close and inutilize socket |
nothing calls this directly
no test coverage detected