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_PORT(3) | libcurl | 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
By default this is 0 which makes it not used. This also makes port number zero impossible to set with this API.PROTOCOLS
Used for all protocols that speak to a port number.EXAMPLE
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
AlwaysRETURN VALUE
Returns CURLE_OKSEE ALSO
CURLINFO_PRIMARY_PORT(3), CURLOPT_STDERR(3), CURLOPT_URL(3)December 4, 2023 | ibcurl 8.5.0 |