]> granicus.if.org Git - curl/commitdiff
doc: use meaningless port number in CURLOPT_LOCALPORT example
authorJohn Marshall <John.W.Marshall@glasgow.ac.uk>
Thu, 31 Jan 2019 11:52:51 +0000 (11:52 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 31 Jan 2019 12:54:59 +0000 (13:54 +0100)
Use an ephemeral port number here; previously the example had 8080
which could be confusing as the common web server port number might
be misinterpreted as suggesting this option affects the remote port.

URL: https://curl.haxx.se/mail/lib-2019-01/0084.html
Closes #3513

docs/libcurl/opts/CURLOPT_LOCALPORT.3
docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3

index 79239ec15ac5721f7349e4c6a9e96537a56c1af7..1911b7c1a6a8d8d7852d9b2e6c8d9298c75801ea 100644 (file)
@@ -41,7 +41,7 @@ All
 CURL *curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
-  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L);
+  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
   /* and try 20 more ports following that */
   curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
   ret = curl_easy_perform(curl);
index dfa231380394735d9f001498abf8571ba68103b8..86f6b2823066b8f95411be3180b05522dc9937af 100644 (file)
@@ -45,7 +45,7 @@ All
 CURL *curl = curl_easy_init();
 if(curl) {
   curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
-  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 8080L);
+  curl_easy_setopt(curl, CURLOPT_LOCALPORT, 49152L);
   /* and try 20 more ports following that */
   curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, 20L);
   ret = curl_easy_perform(curl);