1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

examples: provide <DESC> sections

This commit is contained in:
Daniel Stenberg 2015-07-01 11:43:12 +02:00
parent 4ed8537be6
commit c00b18d540
18 changed files with 89 additions and 29 deletions

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,8 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
// Get a web page, parse it with libxml.
//
/* <DESC>
* Get a web page, extract the title with libxml.
* </DESC>
*/
// Written by Lars Nilsson
//
// GNU C++ compile command line suggestion (edit paths accordingly):

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* simple HTTP POST using the easy interface
* </DESC>
*/
#include <stdio.h>
#include <curl/curl.h>

View File

@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Multiplexed HTTP/2 downloads over a single connection
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* HTTP/2 server push
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>

View File

@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Multiplexed HTTP/2 uploads over a single connection
* </DESC>
*/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* HTTP request with custom modified, removed and added headers
* </DESC>
*/
#include <stdio.h>
#include <curl/curl.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* HTTP PUT with easy interface and read callback
* </DESC>
*/
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Simple HTTPS GET
* </DESC>
*/
#include <stdio.h>
#include <curl/curl.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* Simple IMAP APPEND use
* </DESC>
*/
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,7 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* This is an example showing the multi interface and the debug callback. */
/* <DESC>
* multi interface and debug callback
* </DESC>
*/
#include <stdio.h>
#include <string.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* multi interface code doing two parallel HTTP transfers
* </DESC>
*/
#include <stdio.h>
#include <string.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,8 +19,11 @@
* KIND, either express or implied.
*
***************************************************************************/
/* This is an example application source code using the multi interface
* to do a multipart formpost without "blocking". */
/* <DESC>
* using the multi interface to do a multipart formpost without blocking
* </DESC>
*/
#include <stdio.h>
#include <string.h>
#include <sys/time.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,7 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* This is a very simple example using the multi interface. */
/* <DESC>
* using the multi interface to do a single download
* </DESC>
*/
#include <stdio.h>
#include <string.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -20,6 +20,10 @@
*
***************************************************************************/
/* <DESC>
* multi_socket API using libuv
* </DESC>
*/
/* Example application code using the multi socket interface to download
multiple files at once, but instead of using curl_multi_perform and
curl_multi_wait, which uses select(), we use libuv.

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,8 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* A multi-threaded example that uses pthreads extensively to fetch
* X remote files at once */
/* <DESC>
* A multi-threaded example that uses pthreads to fetch several files at once
* </DESC>
*/
#include <stdio.h>
#include <pthread.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,16 +19,17 @@
* KIND, either express or implied.
*
***************************************************************************/
/* Example source code to show one way to set the necessary OpenSSL locking
* callbacks if you want to do multi-threaded transfers with HTTPS/FTPS with
* libcurl built to use OpenSSL.
*
/* <DESC>
* one way to set the necessary OpenSSL locking callbacks if you want to do
* multi-threaded transfers with HTTPS/FTPS with libcurl built to use OpenSSL.
* </DESC>
*/
/*
* This is not a complete stand-alone example.
*
* Author: Jeremy Brown
*/
#include <stdio.h>
#include <pthread.h>
#include <openssl/err.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,6 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* re-using handles to do HTTP persistent connections
* </DESC>
*/
#include <stdio.h>
#include <unistd.h>
#include <curl/curl.h>

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, 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
@ -19,8 +19,10 @@
* KIND, either express or implied.
*
***************************************************************************/
/* An example source code that issues a HTTP POST and we provide the actual
/* <DESC>
* An example source code that issues a HTTP POST and we provide the actual
* data through a read callback.
* </DESC>
*/
#include <stdio.h>
#include <string.h>