Ruby TCPSocket-alike with timeouts, avoiding Timeout.timeout