.\" $Id: curl_client_init.3,v 1.4 2004/03/24 21:40:45 bagder Exp $ .\" .TH curl_client_init 3 "4 December 2005" "libcurl 7.10.7" "libcurl Manual" .SH NAME curl_client_init - create a client handle .SH SYNOPSIS .B #include .sp .BI "CURLC *curl_client_init(long " flags ");" .ad .SH DESCRIPTION This function creates a "Curl Client" object and returns a CURLC handle to be used as input to \fIcurl_easy_init_c\fP(3) and other client functions. Your program must have a corresponding call to \fIcurl_client_cleanup\fP(3) when you are done with the client object. You can instead use \fIcurl_global_init\fP(3) to create the global client object and save yourself some coding at the expense of program modularity. See the ENVIRONMENT section of the libcurl(3) man page for details on using global and private client objects. The \fIflags\fP argument is a logical or of some combination of the following: .IN +4 \fICURL_CLIENT_GLOBAL_OPENSSL\fP \fICURL_CLIENT_GLOBAL_GNUTLS\fP \fICURL_CLIENT_GLOBAL_WINSOCK\fP \fICURL_CLIENT_GLOBAL_AMIGASOCK\fP \fICURL_CLIENT_GLOBAL_CHARSET\fP .IN -4 Each indicates that you allow libcurl to use a particular global facility in operations connected to the client object. If you don't allow the use of a global facility, libcurls functionality may be reduced. For example, if you don't specify \fICURL_CLIENT_GLOBAL_OPENSSL\fP and libcurl is built to use OpenSSL to access "https" URLs, libcurl will not be able to access https URLs. If you are running under Windows and do not specify \fICURL_CLIENT_GLOBAL_WINSOCK\fP, libcurl will be practically useless, as it will have no way to access the network. All operations will fail. When you indicate that libcurl may use a global facility, you must have previously set up that facility so that libcurl can use it; libcurl does not initialize global facilities for use with client objects you create with \fIcurl_client_init\fP(3). For details on the global facility situation, including what initialization you have to do before specifying these flags, see the libcurl(3) man page. .SH RETURN VALUE If this function returns NULL, something went wrong and a client object did not get created. .SH "SEE ALSO" .BR curl_client_cleanup "(3), " curl_global_init "(3), " .BR curl_easy_init_c "(3), " .BR libcurl "(3), " libcurl-client "(3)"