Add support for socket timeouts