/curl/docs/examples/ |
H A D | crawler.c | 80 CURL *handle = curl_easy_init(); in make_handle() local 84 curl_easy_setopt(handle, CURLOPT_URL, url); in make_handle() 91 curl_easy_setopt(handle, CURLOPT_WRITEDATA, mem); in make_handle() 92 curl_easy_setopt(handle, CURLOPT_PRIVATE, mem); in make_handle() 96 curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L); in make_handle() 101 curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L); in make_handle() 109 curl_easy_setopt(handle, CURLOPT_COOKIEFILE, ""); in make_handle() 110 curl_easy_setopt(handle, CURLOPT_FILETIME, 1L); in make_handle() 116 return handle; in make_handle() 199 CURL *handle = m->easy_handle; in main() local [all …]
|
H A D | ftp-wildcard.c | 47 CURL *handle; in main() local 58 handle = curl_easy_init(); in main() 59 if(!handle) { in main() 65 curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L); in main() 74 curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it); in main() 77 curl_easy_setopt(handle, CURLOPT_CHUNK_DATA, &data); in main() 78 curl_easy_setopt(handle, CURLOPT_WRITEDATA, &data); in main() 84 curl_easy_setopt(handle, CURLOPT_URL, argv[1]); in main() 86 curl_easy_setopt(handle, CURLOPT_URL, "ftp://example.com/test/*"); in main() 89 rc = curl_easy_perform(handle); in main() [all …]
|
H A D | shared-connection-cache.c | 31 static void my_lock(CURL *handle, curl_lock_data data, in my_lock() argument 34 (void)handle; in my_lock() 41 static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) in my_unlock() argument 43 (void)handle; in my_unlock()
|
H A D | multi-uv.c | 65 static void curl_close_cb(uv_handle_t *handle) in curl_close_cb() argument 67 curl_context_t *context = (curl_context_t *) handle->data; in curl_close_cb() 80 CURL *handle; in add_download() local 90 handle = curl_easy_init(); in add_download() 91 curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); in add_download() 92 curl_easy_setopt(handle, CURLOPT_PRIVATE, file); in add_download() 93 curl_easy_setopt(handle, CURLOPT_URL, url); in add_download() 94 curl_multi_add_handle(curl_handle, handle); in add_download()
|
/curl/tests/libtest/ |
H A D | lib575.c | 42 CURL *handle = NULL; in test() local 52 easy_init(handle); in test() 54 easy_setopt(handle, CURLOPT_URL, URL); in test() 56 easy_setopt(handle, CURLOPT_VERBOSE, 1L); in test() 58 res = curl_easy_perform(handle); in test() 62 res = curl_easy_perform(handle); in test() 66 duphandle = curl_easy_duphandle(handle); in test() 69 curl_easy_cleanup(handle); in test() 70 handle = duphandle; in test() 74 multi_add_handle(mhandle, handle); in test() [all …]
|
H A D | lib576.c | 99 CURL *handle = NULL; in test() local 103 handle = curl_easy_init(); in test() 104 if(!handle) { in test() 109 test_setopt(handle, CURLOPT_URL, URL); in test() 110 test_setopt(handle, CURLOPT_WILDCARDMATCH, 1L); in test() 111 test_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, chunk_bgn); in test() 112 test_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, chunk_end); in test() 113 test_setopt(handle, CURLOPT_CHUNK_DATA, &chunk_data); in test() 115 res = curl_easy_perform(handle); in test() 118 if(handle) in test() [all …]
|
H A D | lib658.c | 36 CURL *handle = NULL; in test() local 42 easy_init(handle); in test() 59 easy_setopt(handle, CURLOPT_URL, "http://www.example.com"); in test() 61 easy_setopt(handle, CURLOPT_CURLU, urlp); in test() 62 easy_setopt(handle, CURLOPT_VERBOSE, 1L); in test() 64 res = curl_easy_perform(handle); in test() 75 curl_easy_cleanup(handle); in test()
|
H A D | lib659.c | 36 CURL *handle = NULL; in test() local 41 easy_init(handle); in test() 58 easy_setopt(handle, CURLOPT_CURLU, urlp); in test() 59 easy_setopt(handle, CURLOPT_VERBOSE, 1L); in test() 60 easy_setopt(handle, CURLOPT_PROXY, URL); in test() 62 res = curl_easy_perform(handle); in test() 73 curl_easy_cleanup(handle); in test()
|
H A D | lib674.c | 36 CURL *handle = NULL; in test() local 43 easy_init(handle); in test() 62 easy_setopt(handle, CURLOPT_CURLU, urlp); in test() 63 easy_setopt(handle, CURLOPT_VERBOSE, 1L); in test() 65 res = curl_easy_perform(handle); in test() 73 handle2 = curl_easy_duphandle(handle); in test() 80 curl_easy_cleanup(handle); in test()
|
H A D | lib1550.c | 32 CURLM *handle; in test() local 40 handle = curl_multi_init(); in test() 43 curl_multi_setopt(handle, CURLMOPT_PIPELINING_SERVER_BL, bl_servers); in test() 44 curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites); in test() 45 curl_multi_cleanup(handle); in test()
|
H A D | lib1501.c | 40 CURL *handle = NULL; in test() local 49 easy_init(handle); in test() 51 easy_setopt(handle, CURLOPT_URL, URL); in test() 52 easy_setopt(handle, CURLOPT_VERBOSE, 1L); in test() 56 multi_add_handle(mhandle, handle); in test() 109 curl_easy_cleanup(handle); in test()
|
H A D | lib1554.c | 27 static void my_lock(CURL *handle, curl_lock_data data, in my_lock() argument 30 (void)handle; in my_lock() 37 static void my_unlock(CURL *handle, curl_lock_data data, void *useptr) in my_unlock() argument 39 (void)handle; in my_unlock()
|
/curl/docs/libcurl/ |
H A D | curl_multi_add_handle.md | 19 curl_multi_add_handle - add an easy handle to a multi session 31 Adds the *easy handle* to the *multi_handle*. 34 use curl_easy_perform(3) on that handle. After having removed the easy 35 handle from the multi stack again, it is perfectly fine to use it with the 38 If the easy handle is not set to use a shared (CURLOPT_SHARE(3)) cache, 40 the multi handle when curl_multi_add_handle(3) is called. 43 connection cache owned by the multi handle. Removing and adding new easy 47 If you have CURLMOPT_TIMERFUNCTION(3) set in the multi handle (as you 53 The easy handle remains added to the multi handle until you remove it again 55 specific easy handle is completed. [all …]
|
H A D | curl_multi_remove_handle.md | 17 curl_multi_remove_handle - remove an easy handle from a multi session 30 specified easy handle be removed from this multi handle's control. 32 When the easy handle has been removed from a multi stack, it is again 33 perfectly legal to invoke curl_easy_perform(3) on this easy handle. 35 Removing an easy handle while being in use is perfectly legal and effectively 36 halts the transfer in progress involving that easy handle. All other easy 39 It is fine to remove a handle at any time during a transfer, just not from 42 Removing an easy handle from the multi handle before the corresponding 46 multi handle, ready to get reused for a future transfer using this multi 47 handle. [all …]
|
H A D | curl_easy_cleanup.md | 19 curl_easy_cleanup - End a libcurl easy handle 26 void curl_easy_cleanup(CURL *handle); 32 all resources previously associated with this easy handle. 34 This call closes all connections this handle has used and possibly has kept 35 open until now unless the easy handle was attached to a multi handle while 40 within curl_easy_cleanup(3) (if previously set for the handle using 45 Any use of the easy **handle** after this function has been called and have 48 To close an easy handle that has been used with the multi interface, make sure 49 to first call curl_multi_remove_handle(3) to remove it from the multi handle 52 Passing in a NULL pointer in *handle* makes this function return immediately
|
H A D | curl_easy_duphandle.md | 18 curl_easy_duphandle - Clone a libcurl session handle 25 CURL *curl_easy_duphandle(CURL *handle); 30 This function returns a new curl handle, a duplicate, using all the options 31 previously set in the input curl *handle*. Both handles can subsequently be 34 Any options that the input handle has been told to point to (as opposed to 36 handle as well. You must therefore make sure to keep the data around until 39 The new handle does **not** inherit any state information, no connections, no 43 If the source handle has HSTS or alt-svc enabled, the duplicate gets data read 47 the input handle may not be in use when cloned. 73 If this function returns NULL, something went wrong and no valid handle was
|
H A D | curl_easy_reset.md | 18 curl_easy_reset - reset all options of a libcurl session handle 25 void curl_easy_reset(CURL *handle); 30 Re-initializes all options previously set on a specified CURL handle to the 31 default values. This puts back the handle to the same state as it was in when 34 It does not change the following information kept in the handle: live 46 /* ... the handle is used and options are set ... */
|
H A D | libcurl-share.md | 43 You create a shared object with curl_share_init(3). It returns a handle 54 Then, you make an easy handle to use this share, you set the 56 share handle. You can make any number of easy handles share the same share 57 handle. 59 To make an easy handle stop using that particular share, you set 60 CURLOPT_SHARE(3) to NULL for that easy handle. To make a handle stop 63 When you are done using the share, make sure that no easy handle is still using 64 it, and call curl_share_cleanup(3) on the handle.
|
H A D | curl_url_cleanup.md | 19 curl_url_cleanup - free the URL handle 26 void curl_url_cleanup(CURLU *handle); 31 Frees all the resources associated with the given *CURLU* handle! 33 Passing in a NULL pointer in *handle* makes this function return
|
H A D | curl_mime_init.md | 20 curl_mime_init - create a mime handle 32 curl_mime_init(3) creates a handle to a new empty mime structure. 34 attached to some easy handle using option CURLOPT_MIMEPOST(3) within 36 handle's part using curl_mime_subparts(3). 39 reporting. Since 7.87.0, it does not need to be the final target handle. 41 Using a mime handle is the recommended way to post an HTTP form, format and 76 A mime struct handle, or NULL upon failure.
|
/curl/lib/vauth/ |
H A D | ntlm.c | 73 fprintf(handle, "NTLMFLAG_NEGOTIATE_OEM "); in ntlm_print_flags() 75 fprintf(handle, "NTLMFLAG_REQUEST_TARGET "); in ntlm_print_flags() 77 fprintf(handle, "NTLMFLAG_UNKNOWN_3 "); in ntlm_print_flags() 89 fprintf(handle, "NTLMFLAG_UNKNOWN_10 "); in ntlm_print_flags() 117 fprintf(handle, "NTLMFLAG_UNKNOWN_24 "); in ntlm_print_flags() 119 fprintf(handle, "NTLMFLAG_UNKNOWN_25 "); in ntlm_print_flags() 121 fprintf(handle, "NTLMFLAG_UNKNOWN_26 "); in ntlm_print_flags() 123 fprintf(handle, "NTLMFLAG_UNKNOWN_27 "); in ntlm_print_flags() 125 fprintf(handle, "NTLMFLAG_UNKNOWN_28 "); in ntlm_print_flags() 131 fprintf(handle, "NTLMFLAG_NEGOTIATE_56 "); in ntlm_print_flags() [all …]
|
/curl/tests/http/clients/ |
H A D | h2-pausing.c | 72 (void)handle; /* not used */ in debug_cb() 156 struct handle struct 169 struct handle *handle = (struct handle *) clientp; in cb() argument 178 if(!handle->resumed) { in cb() 179 ++handle->paused; in cb() 181 handle->idx, handle->paused, (long)realsize); in cb() 182 assert(handle->paused == 1); in cb() 185 if(handle->fail_write) { in cb() 186 ++handle->errored; in cb() 188 handle->idx, (long)realsize, handle->errored); in cb() [all …]
|
/curl/docs/libcurl/opts/ |
H A D | CURLOPT_SHARE.md | 16 CURLOPT_SHARE - share handle to use 23 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share); 28 Pass a *share* handle as a parameter. The share handle must have been 30 makes this curl handle use the data from the shared handle instead of keeping 33 the locking methods in the share handle. See curl_share_setopt(3) for 36 If you add a share that is set to share cookies, your easy handle uses that 39 cookies), the easy handle gets its cookie engine disabled. 56 CURL *curl2 = curl_easy_init(); /* a second handle */ 68 /* the second handle shares cookies from the first */
|
H A D | CURLOPT_CURLU.md | 21 CURLOPT_CURLU - URL in URL handle format 28 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CURLU, CURLU *pointer); 33 Pass in a pointer to the *URL* handle to work with. The parameter should be a 40 libcurl uses this handle and its contents read-only and does not change its 41 contents. An application can update the contents of the URL handle after a 42 transfer is done and if the same handle is used in a subsequent request the
|
/curl/tests/server/ |
H A D | sockfilt.c | 161 HANDLE handle = NULL; in read_wincon() local 193 HANDLE handle = NULL; in write_wincon() local 457 handle = data->handle; in select_ws_wait_thread() 459 handles[1] = handle; in select_ws_wait_thread() 467 type = GetFileType(handle); in select_ws_wait_thread() 600 data->handle = handle; in select_ws_wait() 718 handle = select_ws_wait(handle, signal, abort); in select_ws() 719 if(handle) { in select_ws() 772 handle = select_ws_wait(handle, signal, abort); in select_ws() 773 if(handle) { in select_ws() [all …]
|