aboutsummaryrefslogtreecommitdiff
path: root/include/curl/easy.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-05-12 21:43:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-05-12 21:43:24 +0000
commit514592b89207e83d13b5a4e79bc247aa6f74c4b7 (patch)
tree9c9df12cf0f9b8f5e2aa835c4379ae7be9e3805d /include/curl/easy.h
parentd72efff878a352e24d3a7cc8cf7c2f8b0b65f409 (diff)
downloadgnurl-514592b89207e83d13b5a4e79bc247aa6f74c4b7.tar.gz
gnurl-514592b89207e83d13b5a4e79bc247aa6f74c4b7.tar.bz2
gnurl-514592b89207e83d13b5a4e79bc247aa6f74c4b7.zip
- Introducing curl_easy_send() and curl_easy_recv(). They can be used to send
and receive data over a connection previously setup with curl_easy_perform() and its CURLOPT_CONNECT_ONLY option. The sendrecv.c example was added to show how they can be used.
Diffstat (limited to 'include/curl/easy.h')
-rw-r--r--include/curl/easy.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/include/curl/easy.h b/include/curl/easy.h
index 17de21070..88aa0e655 100644
--- a/include/curl/easy.h
+++ b/include/curl/easy.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, 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
@@ -74,6 +74,28 @@ CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
*/
CURL_EXTERN void curl_easy_reset(CURL *curl);
+/*
+ * NAME curl_easy_recv()
+ *
+ * DESCRIPTION
+ *
+ * Receives data from the connected socket. Use after successful
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
+ */
+CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
+ size_t *n);
+
+/*
+ * NAME curl_easy_send()
+ *
+ * DESCRIPTION
+ *
+ * Sends data over the connected socket. Use after successful
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
+ */
+CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
+ size_t buflen, size_t *n);
+
#ifdef __cplusplus
}
#endif