diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c index b8258975e708af4a6a5dcbbed4bbc03da995be20..065d48d921b22a03f550461f9cd1e6d6262fe034 100644 --- a/docs/examples/multi-app.c +++ b/docs/examples/multi-app.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,7 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ -/* This is an example application source code using the multi interface. */ +/* + * A basic application source code using the multi interface doing two + * transfers in parallel. */ +* + */ #include #include diff --git a/docs/examples/postinmemory.c b/docs/examples/postinmemory.c index 3afac4b2f40e8ee9e264d147588261bbad41799e..edeb84e692d86f09ba9ec6dc4f152d11f4ca2f5d 100644 --- a/docs/examples/postinmemory.c +++ b/docs/examples/postinmemory.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Make a HTTP POST with data from memory and receive response in memory. + * + */ #include #include #include diff --git a/docs/examples/postit2.c b/docs/examples/postit2.c index 88ea78c86645a7885f01994dde88371c121c6015..0f8dd98bbdb30794ab4e09459e191223b3916e4c 100644 --- a/docs/examples/postit2.c +++ b/docs/examples/postit2.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * HTTP Multipart formpost with file upload and two additional parts. + * + */ /* Example code that uploads a file name 'foo' to a remote script that accepts * "HTML form based" (as described in RFC1738) uploads using HTTP POST. * diff --git a/docs/examples/progressfunc.c b/docs/examples/progressfunc.c index b2635bc8aed44bb49a5c45896e5c3a2537e7d246..9789762e0de22d3a66b4829590ca2a000fab1baa 100644 --- a/docs/examples/progressfunc.c +++ b/docs/examples/progressfunc.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Use the progress callbacks, old and/or new one depending on avaiable + * libcurl version. + * + */ #include #include diff --git a/docs/examples/resolve.c b/docs/examples/resolve.c index 7b3e5656e0b9372d10874c83067698566f1537a9..cc58bebba7dca337270c97b70b8ec0cf2b987d63 100644 --- a/docs/examples/resolve.c +++ b/docs/examples/resolve.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Use CURLOPT_RESOLVE to feed custom IP addresses for given host name + port + * number combinations. + * + */ #include #include diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c index fed343dfd6db971cc0802093f302feaa2d5fb4e9..581f7339fb5c2f2b7f1ddfa6919d786eee4fab9b 100644 --- a/docs/examples/rtsp.c +++ b/docs/examples/rtsp.c @@ -27,6 +27,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +/* + * A basic RTSP transfer + * + */ #include #include diff --git a/docs/examples/sampleconv.c b/docs/examples/sampleconv.c index 3db316096c6dc12035b68f80c31b0ca0b89e1cf9..466c40cc7b26286ff8f0a0ad9dcecd244a0e0978 100644 --- a/docs/examples/sampleconv.c +++ b/docs/examples/sampleconv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,10 +19,13 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * This is a simple example showing how a program on a non-ASCII platform + * would invoke callbacks to do its own codeset conversions instead of + * using the built-in iconv functions in libcurl. + * + */ /* - This is a simple example showing how a program on a non-ASCII platform - would invoke callbacks to do its own codeset conversions instead of - using the built-in iconv functions in libcurl. The IBM-1047 EBCDIC codeset is used for this example but the code would be similar for other non-ASCII codesets. diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index 88fddf59f86b9c238a4f6a86dfa41a5ece936050..9bc2371caf921e05c148eccc858f61f98362f1af 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,7 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ -/* An example of curl_easy_send() and curl_easy_recv() usage. */ +/* + * An example of curl_easy_send() and curl_easy_recv() usage. + * + */ #include #include @@ -66,6 +69,14 @@ int main(void) size_t iolen; curl_off_t nread; + /* A general note of caution here: if you're using curl_easy_recv() or + curl_easy_send() to implement HTTP or _any_ other protocol libcurl + supports "natively", you're doing it wrong and you should stop. + + This example uses HTTP only to show how to use this API, it does not + suggest that writing an application doing this is sensible. + */ + curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); diff --git a/docs/examples/sepheaders.c b/docs/examples/sepheaders.c index 7402e3542ddfc224bf954b431aa191ee44342064..94cbd909cc1d13be05171c93f7639e424da5ddda 100644 --- a/docs/examples/sepheaders.c +++ b/docs/examples/sepheaders.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Simple HTTP GET that stores the headers in a separate file + * + */ #include #include #include diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c index 2641c7139f8cce3592563a1d47fbf90e70534be1..94e8884c95b2ffed548c206d8f363f859b4f1cac 100644 --- a/docs/examples/sessioninfo.c +++ b/docs/examples/sessioninfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Uses the CURLINFO_TLS_SESSION data. + * + */ /* Note that this example currently requires cURL to be linked against GnuTLS (and this program must also be linked against -lgnutls). */ diff --git a/docs/examples/sftpget.c b/docs/examples/sftpget.c index 434299dc0841fd101aa590e2293462e32fdcfab8..dec91fde95e2e021fd9f2bab7db9d9ee1ab65ea3 100644 --- a/docs/examples/sftpget.c +++ b/docs/examples/sftpget.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Gets a file using an SFTP URL. + * + */ #include diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c index 8657771f46ad45ea9d26d2ba57e981e854f64456..985d7397f49afab5f3fce02dcd4350b51ad50cff 100644 --- a/docs/examples/simplepost.c +++ b/docs/examples/simplepost.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Very simple HTTP POST + * + */ #include #include #include diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c index aefb79f624221944e566282d05a73b63e45f5056..509f1aaa0fe3f0a5f00d6f6db83b1c2d70bc8c9c 100644 --- a/docs/examples/simplessl.c +++ b/docs/examples/simplessl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Shows HTTPS usage with client certs and optional ssl engine use. + * + */ #include #include diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c index 932f6e396357ddfb1bf40f2064c53c675e850aee..a367da05b2e636b55ae6cfa20aa9c82fd3c36df8 100644 --- a/docs/examples/smooth-gtk-thread.c +++ b/docs/examples/smooth-gtk-thread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,9 +19,12 @@ * KIND, either express or implied. * ***************************************************************************/ -/* This is a multi threaded application that uses a progress bar to show +/* + * A multi threaded application that uses a progress bar to show * status. It uses Gtk+ to make a smooth pulse. - * + * + */ +/* * Written by Jud Bishop after studying the other examples provided with * libcurl. * diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c index cd7d0731be498b2cb81fb444f6725ce8d047cb8b..69535ca1c548e46e4c571414df83f68007dc3f37 100644 --- a/docs/examples/synctime.c +++ b/docs/examples/synctime.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Set your system time from a remote HTTP server's Date: header. + * + */ /* This example code only builds as-is on Windows. * * While Unix/Linux user, you do not need this software. diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c index a7e9c2de1674482a9ca6d4645d34a26e4d1ae604..d73766ac0632b5b1d5948b178c523b07344f0eb7 100644 --- a/docs/examples/threaded-ssl.c +++ b/docs/examples/threaded-ssl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Show the required mutex callback setups for GnuTLS and OpenSSL when using + * libcurl multi-threaded. + * + */ /* A multi-threaded example that uses pthreads and fetches 4 remote files at * once over HTTPS. The lock callbacks and stuff assume OpenSSL or GnuTLS * (libgcrypt) so far. diff --git a/docs/examples/url2file.c b/docs/examples/url2file.c index adf696c9a10bd31c9a5618f63fb79aed14d594ae..a357a3120ed8ec669831fa584bcc096822e93e24 100644 --- a/docs/examples/url2file.c +++ b/docs/examples/url2file.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,6 +19,10 @@ * KIND, either express or implied. * ***************************************************************************/ +/* + * Download a given URL into a local file named page.out. + * + */ #include #include #include diff --git a/docs/examples/usercertinmem.c b/docs/examples/usercertinmem.c index dd56c6167e17a575d147c0b8876de0dc7de870d6..43716eaeea39c356abe6bd0b1f94edbdacf73592 100644 --- a/docs/examples/usercertinmem.c +++ b/docs/examples/usercertinmem.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2013, Daniel Stenberg, , et al. + * Copyright (C) 2013 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,10 +19,13 @@ * KIND, either express or implied. * ***************************************************************************/ +/* /* Example using an in memory PEM user certificate and RSA key to retrieve an * https page. - * Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c. - * Note that to maintain simplicity this example does not use a CA certificate + * + */ +/* Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c. + * Note that to maintain simplicity this example does not use a CA certificate * for peer verification. However, some form of peer verification * must be used in real circumstances when a secure connection is required. */ diff --git a/docs/examples/xmlstream.c b/docs/examples/xmlstream.c index 8193445027dd8a180654e67fc1910cdd2952fe6b..1b3c6b6bdde2bffba4e8402f52e5dc0a3be7a06d 100644 --- a/docs/examples/xmlstream.c +++ b/docs/examples/xmlstream.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -19,8 +19,11 @@ * KIND, either express or implied. * ***************************************************************************/ -/* Stream-parse a document using the streaming Expat parser. - * Written by David Strauss +/* + * Stream-parse a document using the streaming Expat parser. + * + */ +/* Written by David Strauss * * Expat => http://www.libexpat.org/ *