diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-01-04 15:34:05 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-01-04 15:34:05 +0100 |
commit | 2e503441edc98dedb6c070be6b526e4264762586 (patch) | |
tree | 5502b876ad1d72707d5c36d225c15497b14e8332 /docs/examples/sendrecv.c | |
parent | e45059214c432b41ae9926f8a64bfce917281fb1 (diff) |
examples: added descriptions
Diffstat (limited to 'docs/examples/sendrecv.c')
-rw-r--r-- | docs/examples/sendrecv.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c index 88fddf59f..9bc2371ca 100644 --- a/docs/examples/sendrecv.c +++ b/docs/examples/sendrecv.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2016, 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. * ***************************************************************************/ -/* An example of curl_easy_send() and curl_easy_recv() usage. */ +/* <DESC> + * An example of curl_easy_send() and curl_easy_recv() usage. + * </DESC> + */ #include <stdio.h> #include <string.h> @@ -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"); |