I think you want `CURLOPT_CONNECTTIMEOUT_MS`.