Git init
[external/curl.git] / docs / libcurl / curl_easy_init.3
1 .\"
2 .TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
3 .SH NAME
4 curl_easy_init - Start a libcurl easy session
5 .SH SYNOPSIS
6 .B #include <curl/curl.h>
7
8 .BI "CURL *curl_easy_init( );"
9
10 .SH DESCRIPTION
11 This function must be the first function to call, and it returns a CURL easy
12 handle that you must use as input to other easy-functions. curl_easy_init
13 initializes curl and this call \fBMUST\fP have a corresponding call to
14 \fIcurl_easy_cleanup(3)\fP when the operation is complete.
15
16 If you did not already call \fIcurl_global_init(3)\fP,
17 \fIcurl_easy_init(3)\fP does it automatically.
18 This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
19 not thread-safe, and it may result in resource problems because there is
20 no corresponding cleanup.
21
22 You are strongly advised to not allow this automatic behaviour, by
23 calling \fIcurl_global_init(3)\fP yourself properly.
24 See the description in \fBlibcurl\fP(3) of global environment
25 requirements for details of how to use this function.
26
27 .SH RETURN VALUE
28 If this function returns NULL, something went wrong and you cannot use the
29 other curl functions.
30 .SH "SEE ALSO"
31 .BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"