Implement socket I/O timeouts.