3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
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 https://curl.haxx.se/docs/copyright.html.
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.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ***************************************************************************/
28 CURL_EXTERN CURL *curl_easy_init(void);
29 CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
30 CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
31 CURL_EXTERN void curl_easy_cleanup(CURL *curl);
34 * NAME curl_easy_getinfo()
38 * Request internal information from the curl session with this function. The
39 * third argument MUST be a pointer to a long, a pointer to a char * or a
40 * pointer to a double (as the documentation describes elsewhere). The data
41 * pointed to will be filled in accordingly and can be relied upon only if the
42 * function returns CURLE_OK. This function is intended to get used *AFTER* a
43 * performed transfer, all results from this function are undefined until the
44 * transfer is completed.
46 CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
50 * NAME curl_easy_duphandle()
54 * Creates a new curl session handle with the same options set for the handle
55 * passed in. Duplicating a handle could only be a matter of cloning data and
56 * options, internal state info and things like persistent connections cannot
57 * be transferred. It is useful in multithreaded applications when you can run
58 * curl_easy_duphandle() for each new thread to avoid a series of identical
59 * curl_easy_setopt() invokes in every thread.
61 CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
64 * NAME curl_easy_reset()
68 * Re-initializes a CURL handle to the default values. This puts back the
69 * handle to the same state as it was in when it was just created.
71 * It does keep: live connections, the Session ID cache, the DNS cache and the
74 CURL_EXTERN void curl_easy_reset(CURL *curl);
77 * NAME curl_easy_recv()
81 * Receives data from the connected socket. Use after successful
82 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
84 CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
88 * NAME curl_easy_send()
92 * Sends data over the connected socket. Use after successful
93 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
95 CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
96 size_t buflen, size_t *n);