From 2e503441edc98dedb6c070be6b526e4264762586 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Jan 2016 15:34:05 +0100 Subject: examples: added descriptions --- docs/examples/sendrecv.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'docs/examples/sendrecv.c') 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, , 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"); -- cgit v1.2.3