1 .\" You can view this file with:
3 .\" $Id: curl_global_init.3,v 1.2 2004/02/27 15:34:06 bagder Exp $
5 .TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual"
7 curl_global_init - Global libcurl initialisation
9 .B #include <curl/curl.h>
11 .BI "CURLcode curl_global_init(long " flags ");"
14 This function should only be called once (no matter how many threads or
15 libcurl sessions that'll be used) by every application that uses libcurl.
17 If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called,
18 it will be done automatically by libcurl.
20 The flags option is a bit pattern that tells libcurl exact what features to
21 init, as described below. Set the desired bits by ORing the values together.
23 You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function,
24 as that cannot be called automatically for you by libcurl.
26 Calling this function more than once will cause unpredictable results.
31 Initialize everything possible. This sets all known bits.
37 Initialize the Win32 socket libraries.
39 .B CURL_GLOBAL_NOTHING
40 Initialise nothing extra. This sets no bit.
42 If this function returns non-zero, something went wrong and you cannot use the
45 .BR curl_global_cleanup "(3), "