Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
CURLOPT_PORT(3) | Library Functions Manual | CURLOPT_PORT(3) |
NAME
CURLOPT_PORT - remote port number to connect toDESCRIPTION
We discourage using this option since its scope is not obvious and hard to predict. Set the preferred port number in the URL instead.DEFAULT
0 which makes it not used. This also makes port number zero impossible to set with this API.PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_PORT, 8080L);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
AVAILABILITY
Added in curl 7.1RETURN VALUE
Returns CURLE_OKSEE ALSO
CURLINFO_PRIMARY_PORT(3), CURLOPT_STDERR(3), CURLOPT_URL(3)2024-11-24 | libcurl |