Planeshift
easy.h
Go to the documentation of this file.
1 #ifndef __CURL_EASY_H
2 #define __CURL_EASY_H
3 /***************************************************************************
4  * _ _ ____ _
5  * Project ___| | | | _ \| |
6  * / __| | | | |_) | |
7  * | (__| |_| | _ <| |___
8  * \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
11  *
12  * This software is licensed as described in the file COPYING, which
13  * you should have received as part of this distribution. The terms
14  * are also available at http://curl.haxx.se/docs/copyright.html.
15  *
16  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17  * copies of the Software, and permit persons to whom the Software is
18  * furnished to do so, under the terms of the COPYING file.
19  *
20  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21  * KIND, either express or implied.
22  *
23  * $Id: easy.h 8795 2013-09-14 06:15:05Z joelyon $
24  ***************************************************************************/
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 
34 /*
35  * NAME curl_easy_getinfo()
36  *
37  * DESCRIPTION
38  *
39  * Request internal information from the curl session with this function. The
40  * third argument MUST be a pointer to a long, a pointer to a char * or a
41  * pointer to a double (as the documentation describes elsewhere). The data
42  * pointed to will be filled in accordingly and can be relied upon only if the
43  * function returns CURLE_OK. This function is intended to get used *AFTER* a
44  * performed transfer, all results from this function are undefined until the
45  * transfer is completed.
46  */
48 
49 
50 /*
51  * NAME curl_easy_duphandle()
52  *
53  * DESCRIPTION
54  *
55  * Creates a new curl session handle with the same options set for the handle
56  * passed in. Duplicating a handle could only be a matter of cloning data and
57  * options, internal state info and things like persistant connections cannot
58  * be transfered. It is useful in multithreaded applications when you can run
59  * curl_easy_duphandle() for each new thread to avoid a series of identical
60  * curl_easy_setopt() invokes in every thread.
61  */
63 
64 /*
65  * NAME curl_easy_reset()
66  *
67  * DESCRIPTION
68  *
69  * Re-initializes a CURL handle to the default values. This puts back the
70  * handle to the same state as it was in when it was just created.
71  *
72  * It does keep: live connections, the Session ID cache, the DNS cache and the
73  * cookies.
74  */
75 CURL_EXTERN void curl_easy_reset(CURL *curl);
76 
77 /*
78  * NAME curl_easy_recv()
79  *
80  * DESCRIPTION
81  *
82  * Receives data from the connected socket. Use after successful
83  * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
84  */
85 CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
86  size_t *n);
87 
88 /*
89  * NAME curl_easy_send()
90  *
91  * DESCRIPTION
92  *
93  * Sends data over the connected socket. Use after successful
94  * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
95  */
96 CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
97  size_t buflen, size_t *n);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif
CURL_EXTERN void curl_easy_reset(CURL *curl)
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, size_t buflen, size_t *n)
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, size_t *n)
CURLcode
Definition: curl.h:310
CURLINFO
Definition: curl.h:1670
CURL_EXTERN CURL * curl_easy_duphandle(CURL *curl)
CURL_EXTERN CURL * curl_easy_init(void)
CURL_EXTERN void curl_easy_cleanup(CURL *curl)
void CURL
Definition: download.h:29
CURLoption
Definition: curl.h:657
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info,...)
#define CURL_EXTERN
Definition: curl.h:122
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option,...)
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl)