public void setConnectionTimeout(long timeout, TimeUnit unit) {
        this.connectionTimeout = unit.toMillis(timeout);
    }
<p>Sets the allocated time that this HttpRequest is allowed to spend trying to connect to a remote host. This has
no effect on an HttpRequest received by a {@link RequestHandler}. If no connection timeout is assigned to an
HttpRequest, it defaults the connection-timeout in the client configuration.</p>

<p><b>NOTE:</b> Where {@link Request#setTimeout(long, TimeUnit)} sets the expiration time between calling a
RequestHandler and a {@link ResponseHandler}, this method sets the expiration time of the connect-operation as
performed by the client.</p>

@param timeout The allocated amount of time.
@param unit    The time unit of the <em>timeout</em> argument.
container-core/src/main/java/com/yahoo/jdisc/http/HttpRequest.java