NS/releases/3.05/source/curl/docs/libcurl/curl_global_init.html

129 lines
2.1 KiB
HTML
Raw Normal View History

<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
curl_global_init - Global libcurl initialisation
</PRE>
<H2>SYNOPSIS</H2><PRE>
<B>#include</B> <B>&lt;curl/curl.h&gt;</B>
<B>CURLcode</B> <B>curl_global_init(long</B> <I>flags</I><B>);</B>
</PRE>
<H2>DESCRIPTION</H2><PRE>
This function should only be called once (no matter how
many threads or libcurl sessions that'll be used) by every
application that uses libcurl.
If this function hasn't been invoked when <I>curl</I><B>_</B><I>easy</I><B>_</B><I>init</I>
is called, it will be done automatically by libcurl.
The flags option is a bit pattern that tells libcurl exact
what features to init, as described below. Set the desired
bits by ORing the values together.
You must however <B>always</B> use the <I>curl</I><B>_</B><I>global</I><B>_</B><I>cleanup</I> func-
tion, as that cannot be called automatically for you by
libcurl.
Calling this function more than once will cause unpre-
dictable results.
This function was added in libcurl 7.8.
</PRE>
<H2>FLAGS</H2><PRE>
<B>CURL_GLOBAL_ALL</B>
Initialize everything possible. This sets all known
bits.
<B>CURL_GLOBAL_SSL</B>
Initialize SSL
<B>CURL_GLOBAL_WIN32</B>
Initialize the Win32 socket libraries. (added in
libcurl 7.8.1)
<B>CURL_GLOBAL_NOTHING</B>
Initialise nothing extra. This sets no bit.
</PRE>
<H2>RETURN VALUE</H2><PRE>
If this function returns non-zero, something went wrong
and you cannot use the other curl functions.
</PRE>
<H2>SEE ALSO</H2><PRE>
<B>curl_global_cleanup(3)</B>,
</PRE>
<H2>BUGS</H2><PRE>
None.
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>