curl_easy_reset.md (1063B)
1 --- 2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3 SPDX-License-Identifier: curl 4 Title: curl_easy_reset 5 Section: 3 6 Source: libcurl 7 See-also: 8 - curl_easy_cleanup (3) 9 - curl_easy_duphandle (3) 10 - curl_easy_init (3) 11 - curl_easy_setopt (3) 12 Protocol: 13 - All 14 Added-in: 7.12.1 15 --- 16 17 # NAME 18 19 curl_easy_reset - reset all options of a libcurl session handle 20 21 # SYNOPSIS 22 23 ~~~c 24 #include <curl/curl.h> 25 26 void curl_easy_reset(CURL *handle); 27 ~~~ 28 29 # DESCRIPTION 30 31 Re-initializes all options previously set on a specified curl handle to the 32 default values. This puts back the handle to the same state as it was in when 33 it was just created with curl_easy_init(3). 34 35 It does not change the following information kept in the handle: live 36 connections, the Session ID cache, the DNS cache, the cookies, the shares or 37 the alt-svc cache. 38 39 # %PROTOCOLS% 40 41 # EXAMPLE 42 43 ~~~c 44 int main(void) 45 { 46 CURL *curl = curl_easy_init(); 47 if(curl) { 48 49 /* ... the handle is used and options are set ... */ 50 curl_easy_reset(curl); 51 } 52 } 53 ~~~ 54 55 # %AVAILABILITY% 56 57 # RETURN VALUE 58 59 Nothing