* Convert milliseconds to a struct timeval for select. */
| 231 | * Convert milliseconds to a struct timeval for select. |
| 232 | */ |
| 233 | struct timeval static MillisToTimeval(int64_t nTimeout) |
| 234 | { |
| 235 | struct timeval timeout; |
| 236 | timeout.tv_sec = nTimeout / 1000; |
| 237 | timeout.tv_usec = (nTimeout % 1000) * 1000; |
| 238 | return timeout; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Read bytes from socket. This will either read the full number of bytes requested |
no outgoing calls
no test coverage detected