curl_global_init.3 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .\" You can view this file with:
  2. .\" nroff -man [file]
  3. .\" $Id: curl_global_init.3,v 1.2 2004/02/27 15:34:06 bagder Exp $
  4. .\"
  5. .TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual"
  6. .SH NAME
  7. curl_global_init - Global libcurl initialisation
  8. .SH SYNOPSIS
  9. .B #include <curl/curl.h>
  10. .sp
  11. .BI "CURLcode curl_global_init(long " flags ");"
  12. .ad
  13. .SH DESCRIPTION
  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.
  16. If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called,
  17. it will be done automatically by libcurl.
  18. The flags option is a bit pattern that tells libcurl exact what features to
  19. init, as described below. Set the desired bits by ORing the values together.
  20. You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function,
  21. as that cannot be called automatically for you by libcurl.
  22. Calling this function more than once will cause unpredictable results.
  23. .SH FLAGS
  24. .TP 5
  25. .B CURL_GLOBAL_ALL
  26. Initialize everything possible. This sets all known bits.
  27. .TP
  28. .B CURL_GLOBAL_SSL
  29. Initialize SSL
  30. .TP
  31. .B CURL_GLOBAL_WIN32
  32. Initialize the Win32 socket libraries.
  33. .TP
  34. .B CURL_GLOBAL_NOTHING
  35. Initialise nothing extra. This sets no bit.
  36. .SH RETURN VALUE
  37. If this function returns non-zero, something went wrong and you cannot use the
  38. other curl functions.
  39. .SH "SEE ALSO"
  40. .BR curl_global_cleanup "(3), "