xref: /aosp_15_r20/external/curl/docs/libcurl/curl_easy_reset.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerTitle: curl_easy_reset
5*6236dae4SAndroid Build Coastguard WorkerSection: 3
6*6236dae4SAndroid Build Coastguard WorkerSource: libcurl
7*6236dae4SAndroid Build Coastguard WorkerSee-also:
8*6236dae4SAndroid Build Coastguard Worker  - curl_easy_cleanup (3)
9*6236dae4SAndroid Build Coastguard Worker  - curl_easy_duphandle (3)
10*6236dae4SAndroid Build Coastguard Worker  - curl_easy_init (3)
11*6236dae4SAndroid Build Coastguard Worker  - curl_easy_setopt (3)
12*6236dae4SAndroid Build Coastguard WorkerProtocol:
13*6236dae4SAndroid Build Coastguard Worker  - All
14*6236dae4SAndroid Build Coastguard WorkerAdded-in: 7.12.1
15*6236dae4SAndroid Build Coastguard Worker---
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# NAME
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard Workercurl_easy_reset - reset all options of a libcurl session handle
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard Worker# SYNOPSIS
22*6236dae4SAndroid Build Coastguard Worker
23*6236dae4SAndroid Build Coastguard Worker~~~c
24*6236dae4SAndroid Build Coastguard Worker#include <curl/curl.h>
25*6236dae4SAndroid Build Coastguard Worker
26*6236dae4SAndroid Build Coastguard Workervoid curl_easy_reset(CURL *handle);
27*6236dae4SAndroid Build Coastguard Worker~~~
28*6236dae4SAndroid Build Coastguard Worker
29*6236dae4SAndroid Build Coastguard Worker# DESCRIPTION
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard WorkerRe-initializes all options previously set on a specified CURL handle to the
32*6236dae4SAndroid Build Coastguard Workerdefault values. This puts back the handle to the same state as it was in when
33*6236dae4SAndroid Build Coastguard Workerit was just created with curl_easy_init(3).
34*6236dae4SAndroid Build Coastguard Worker
35*6236dae4SAndroid Build Coastguard WorkerIt does not change the following information kept in the handle: live
36*6236dae4SAndroid Build Coastguard Workerconnections, the Session ID cache, the DNS cache, the cookies, the shares or
37*6236dae4SAndroid Build Coastguard Workerthe alt-svc cache.
38*6236dae4SAndroid Build Coastguard Worker
39*6236dae4SAndroid Build Coastguard Worker# %PROTOCOLS%
40*6236dae4SAndroid Build Coastguard Worker
41*6236dae4SAndroid Build Coastguard Worker# EXAMPLE
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard Worker~~~c
44*6236dae4SAndroid Build Coastguard Workerint main(void)
45*6236dae4SAndroid Build Coastguard Worker{
46*6236dae4SAndroid Build Coastguard Worker  CURL *curl = curl_easy_init();
47*6236dae4SAndroid Build Coastguard Worker  if(curl) {
48*6236dae4SAndroid Build Coastguard Worker
49*6236dae4SAndroid Build Coastguard Worker    /* ... the handle is used and options are set ... */
50*6236dae4SAndroid Build Coastguard Worker    curl_easy_reset(curl);
51*6236dae4SAndroid Build Coastguard Worker  }
52*6236dae4SAndroid Build Coastguard Worker}
53*6236dae4SAndroid Build Coastguard Worker~~~
54*6236dae4SAndroid Build Coastguard Worker
55*6236dae4SAndroid Build Coastguard Worker# %AVAILABILITY%
56*6236dae4SAndroid Build Coastguard Worker
57*6236dae4SAndroid Build Coastguard Worker# RETURN VALUE
58*6236dae4SAndroid Build Coastguard Worker
59*6236dae4SAndroid Build Coastguard WorkerNothing
60