Sets connection timeout (in milliseconds) for TCP and HTTP.