|
|
|||
File indexing completed on 2026-09-14 09:04:44
0001 #ifndef CURLINC_EASY_H 0002 #define CURLINC_EASY_H 0003 /*************************************************************************** 0004 * _ _ ____ _ 0005 * Project ___| | | | _ \| | 0006 * / __| | | | |_) | | 0007 * | (__| |_| | _ <| |___ 0008 * \___|\___/|_| \_\_____| 0009 * 0010 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 0011 * 0012 * This software is licensed as described in the file COPYING, which 0013 * you should have received as part of this distribution. The terms 0014 * are also available at https://curl.se/docs/copyright.html. 0015 * 0016 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 0017 * copies of the Software, and permit persons to whom the Software is 0018 * furnished to do so, under the terms of the COPYING file. 0019 * 0020 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 0021 * KIND, either express or implied. 0022 * 0023 * SPDX-License-Identifier: curl 0024 * 0025 ***************************************************************************/ 0026 #ifdef __cplusplus 0027 extern "C" { 0028 #endif 0029 0030 /* Flag bits in the curl_blob struct: */ 0031 #define CURL_BLOB_COPY 1 /* tell libcurl to copy the data */ 0032 #define CURL_BLOB_NOCOPY 0 /* tell libcurl to NOT copy the data */ 0033 0034 struct curl_blob { 0035 void *data; 0036 size_t len; 0037 unsigned int flags; /* bit 0 is defined, the rest are reserved and should be 0038 left zeroes */ 0039 }; 0040 0041 CURL_EXTERN CURL *curl_easy_init(void); 0042 CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 0043 CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 0044 CURL_EXTERN void curl_easy_cleanup(CURL *curl); 0045 0046 /* 0047 * NAME curl_easy_getinfo() 0048 * 0049 * DESCRIPTION 0050 * 0051 * Request internal information from the curl session with this function. 0052 * The third argument MUST be pointing to the specific type of the used option 0053 * which is documented in each man page of the option. The data pointed to 0054 * is filled in accordingly and can be relied upon only if the function 0055 * returns CURLE_OK. This function is intended to get used *AFTER* a performed 0056 * transfer, all results from this function are undefined until the transfer 0057 * is completed. 0058 */ 0059 CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 0060 0061 /* 0062 * NAME curl_easy_duphandle() 0063 * 0064 * DESCRIPTION 0065 * 0066 * Creates a new curl session handle with the same options set for the handle 0067 * passed in. Duplicating a handle could only be a matter of cloning data and 0068 * options, internal state info and things like persistent connections cannot 0069 * be transferred. It is useful in multi-threaded applications when you can run 0070 * curl_easy_duphandle() for each new thread to avoid a series of identical 0071 * curl_easy_setopt() invokes in every thread. 0072 */ 0073 CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 0074 0075 /* 0076 * NAME curl_easy_reset() 0077 * 0078 * DESCRIPTION 0079 * 0080 * Re-initializes a curl handle to the default values. This puts back the 0081 * handle to the same state as it was in when it was created. 0082 * 0083 * It does keep: live connections, the Session ID cache, the DNS cache and the 0084 * cookies. 0085 */ 0086 CURL_EXTERN void curl_easy_reset(CURL *curl); 0087 0088 /* 0089 * NAME curl_easy_recv() 0090 * 0091 * DESCRIPTION 0092 * 0093 * Receives data from the connected socket. Use after successful 0094 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 0095 */ 0096 CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 0097 size_t *n); 0098 0099 /* 0100 * NAME curl_easy_send() 0101 * 0102 * DESCRIPTION 0103 * 0104 * Sends data over the connected socket. Use after successful 0105 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 0106 */ 0107 CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 0108 size_t buflen, size_t *n); 0109 0110 /* 0111 * NAME curl_easy_upkeep() 0112 * 0113 * DESCRIPTION 0114 * 0115 * Performs connection upkeep for the given session handle. 0116 */ 0117 CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 0118 0119 #ifdef __cplusplus 0120 } /* end of extern "C" */ 0121 #endif 0122 0123 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|