Curl libcurl APICurl_global_initCurl_global_init.3 -- man pageName Curl_global_init-Global libcurl initialisation Synopsis# Include <curl/curl. h> Curlcode curl_global_init (long flags ); DescriptionThis function sets up the program environment that libcurl needs. Think of it as an extension of the Library loader. This function installs the program environment required by libcurl. It can be considered as a library loader. This function is used to load library files. This function must be called at least once within a program (a program is all the code that shares a memory space) before the program CILS any other function in libcurl. the environment it sets up is constant for the life of Program and is the same for every program, so multiple callhave the same effect as one call. Before the program calls other functions in libcurl, curl_global_init must be called once. Once initialized, it will be valid for the lifetime of your program. Multiple calls to this function serve the same purpose as one call. Therefore, you only need to call it once. The flags option is a bit pattern that tells libcurl exactly what features to init, as described below. set the desired BITs by oring the values together. in normal operation, you must specify curl_global_all. don't use any other Value unless you are familiar with it and mean to control internal operations of libcurl. The flags option is a single-bit mode used to accurately indicate which features libcurl initializes. Normal operation. You can set flags = curl_global_all. Unless you are familiar with libcurl, do not use other values, which means to perform internal operations on libcurl. This function is not thread safe. you must not call it when any other thread in the Program (I. e. A thread sharing the same memory) is running. this doesn't just mean no other thread that is Using libcurl. Because curl_global_init () callfunctions of other libraries that are similarly thread unsafe, it cocould conflict with any other thread that uses these other libraries. This function is not thread-safe.In a program, do not call this function when other threads are running. This does not just mean that other threads are using libcurl. Because the curl_global_init function calls functions of other libraries, it may also be thread insecure, which will conflict with other threads that use these libraries. See the description in libcurl (3) of global environment requirements for details of how to use this function. Flags Curl_global_all initialize everything possible. This sets all known bits. Curl_global_ssl initialize SSL Curl_global_win32 initialize the Win32 socket libraries. Curl_global_nothing initialise nothing extra. This sets no bit. Curl_global_default a sensible default. It will init both SSL and win32. right now, this equals the functionality of the curl_global_all mask. Return ValueIf this function returns non-zero, something wrong and you cannot use the other cURL functions. See alsoCurl_global_init_mem (3) curl_global_cleanup (3) curl_easy_init (3) libcurl (3) This html page was made with roffit. |