Loading docs/libcurl/opts/CURLINFO_LOCAL_IP.3 +19 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -41,7 +41,24 @@ corresponding CURL handle. .SH PROTOCOLS All .SH EXAMPLE TODO .nf { char *ip; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); /* Check for errors */ if((res == CURLE_OK) && !curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) { printf("Local IP: %s\\n", ip); } /* always cleanup */ curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE Loading docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 +16 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -33,7 +33,21 @@ connection done with this \fBcurl\fP handle. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long port; res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port); if(!res) printf("Connected to remote port: %ld\n", port); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE Loading docs/libcurl/opts/CURLINFO_PRIVATE.3 +17 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -35,7 +35,22 @@ pointer, although effectively being a 'void *'. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { void *pointer = 0x2345454; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); /* set the private pointer */ curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer); ret = curl_easy_perform(curl); /* extract the private pointer again */ ret = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer); curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.10.3 .SH RETURN VALUE Loading docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 +15 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -33,7 +33,20 @@ actually followed. .SH PROTOCOLS HTTP(S) .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); res = curl_easy_perform(curl); if(res == CURLE_OK) { long redirects; curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.9.7 .SH RETURN VALUE Loading docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 +16 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -34,7 +34,21 @@ than one request if \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long req; res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req); if(!res) printf("Request size: %ld bytes\n", req); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE Loading Loading
docs/libcurl/opts/CURLINFO_LOCAL_IP.3 +19 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -41,7 +41,24 @@ corresponding CURL handle. .SH PROTOCOLS All .SH EXAMPLE TODO .nf { char *ip; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); /* Check for errors */ if((res == CURLE_OK) && !curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) { printf("Local IP: %s\\n", ip); } /* always cleanup */ curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE Loading
docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3 +16 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -33,7 +33,21 @@ connection done with this \fBcurl\fP handle. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long port; res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port); if(!res) printf("Connected to remote port: %ld\n", port); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.21.0 .SH RETURN VALUE Loading
docs/libcurl/opts/CURLINFO_PRIVATE.3 +17 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -35,7 +35,22 @@ pointer, although effectively being a 'void *'. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { void *pointer = 0x2345454; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin"); /* set the private pointer */ curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer); ret = curl_easy_perform(curl); /* extract the private pointer again */ ret = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer); curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.10.3 .SH RETURN VALUE Loading
docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3 +15 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -33,7 +33,20 @@ actually followed. .SH PROTOCOLS HTTP(S) .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); res = curl_easy_perform(curl); if(res == CURLE_OK) { long redirects; curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.9.7 .SH RETURN VALUE Loading
docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3 +16 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms Loading Loading @@ -34,7 +34,21 @@ than one request if \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled. .SH PROTOCOLS All .SH EXAMPLE TODO .nf CURL *curl = curl_easy_init(); if(curl) { CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); res = curl_easy_perform(curl); if(res == CURLE_OK) { long req; res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req); if(!res) printf("Request size: %ld bytes\n", req); } curl_easy_cleanup(curl); } .fi .SH AVAILABILITY Added in 7.4.1 .SH RETURN VALUE Loading