Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
CURLOPT_CONNECT_TO(3) | curl_easy_setopt options | CURLOPT_CONNECT_TO(3) |
NAME
CURLOPT_CONNECT_TO - Connect to a specific host and port instead of the URL's host and portSYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_TO, struct curl_slist *connect_to);
DESCRIPTION
Pass a pointer to a linked list of strings with "connect to" information to use for establishing network connections with this handle. The linked list should be a fully valid list of struct curl_slist structs properly filled in. Use curl_slist_append(3) to create the list and curl_slist_free_all(3) to clean up an entire list.DEFAULT
NULLPROTOCOLS
AllEXAMPLE
CURL *curl; struct curl_slist *connect_to = NULL; connect_to = curl_slist_append(NULL, "example.com::server1.example.com:"); curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CONNECT_TO, connect_to); curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_perform(curl); /* always cleanup */ curl_easy_cleanup(curl); } curl_slist_free_all(connect_to);
AVAILABILITY
Added in 7.49.0RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_URL(3), CURLOPT_RESOLVE(3), CURLOPT_FOLLOWLOCATION(3), CURLOPT_HTTPPROXYTUNNEL(3),May 5, 2018 | libcurl 7.69.0 |