* Convert milliseconds to a struct timeval for select. */
| 239 | * Convert milliseconds to a struct timeval for select. |
| 240 | */ |
| 241 | struct timeval MillisToTimeval(int64_t nTimeout) |
| 242 | { |
| 243 | struct timeval timeout; |
| 244 | timeout.tv_sec = nTimeout / 1000; |
| 245 | timeout.tv_usec = (nTimeout % 1000) * 1000; |
| 246 | return timeout; |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Read bytes from socket. This will either read the full number of bytes requested |
no outgoing calls
no test coverage detected