Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_CONNECT_ONLY(3) | Library Functions Manual | CURLOPT_CONNECT_ONLY(3) |
NAME
CURLOPT_CONNECT_ONLY - stop when connected to target serverSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_ONLY, long only);
DESCRIPTION
Pass a long. If the parameter equals 1, it tells the library to perform all the required proxy authentication and connection setup, but no data transfer, and then return.DEFAULT
0PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
ret = curl_easy_perform(curl);
if(ret == CURLE_OK) {
/* only connected! */
}
}
}
HISTORY
WS and WSS support added in 7.86.0.AVAILABILITY
Added in curl 7.15.2RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_HTTPPROXYTUNNEL(3), CURLOPT_VERBOSE(3), curl_easy_recv(3), curl_easy_send(3)2024-12-21 | libcurl |