1curl_global_init(3)             libcurl Manual             curl_global_init(3)
2
3
4

NAME

6       curl_global_init - Global libcurl initialisation
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_global_init(long flags);
12

DESCRIPTION

14       This  function  sets  up  the  program  environment that libcurl needs.
15       Think of it as an extension of the library loader.
16
17       This function must be called at least once within a program (a  program
18       is  all  the  code that shares a memory space) before the program calls
19       any other function in libcurl.  The environment it sets up is  constant
20       for  the life of the program and is the same for every program, so mul‐
21       tiple calls have the same effect as one call.
22
23       The flags option is a bit pattern that tells libcurl exactly what  fea‐
24       tures  to  init,  as described below. Set the desired bits by ORing the
25       values   together.    In   normal   operation,   you    must    specify
26       CURL_GLOBAL_ALL.   Don't  use  any  other value unless you are familiar
27       with and mean to control internal operations of libcurl.
28
29       This function is not thread safe. You must not call it when  any  other
30       thread  in  the program (i.e. a thread sharing the same memory) is run‐
31       ning.  This doesn't just mean no other thread that  is  using  libcurl.
32       Because  curl_global_init() calls functions of other libraries that are
33       similarly thread unsafe, it could conflict with any other  thread  that
34       uses these other libraries.
35
36       See  the  description  in libcurl(3) of global environment requirements
37       for details of how to use this function.
38
39

FLAGS

41       CURL_GLOBAL_ALL
42            Initialize everything possible. This sets all known bits.
43
44       CURL_GLOBAL_SSL
45            Initialize SSL
46
47       CURL_GLOBAL_WIN32
48            Initialize the Win32 socket libraries.
49
50       CURL_GLOBAL_NOTHING
51            Initialise nothing extra. This sets no bit.
52

RETURN VALUE

54       If this function returns non-zero, something went wrong and you  cannot
55       use the other curl functions.
56

SEE ALSO

58       curl_global_init_mem(3),    curl_global_cleanup(3),   curl_easy_init(3)
59       libcurl(3)
60
61
62
63libcurl 7.12                      11 May 2004              curl_global_init(3)
Impressum