diff options
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"); |