Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
libcurl(3) | Library Functions Manual | libcurl(3) |
NAME
libcurl - client-side URL transfersDESCRIPTION
This is a short overview on how to use libcurl in your C programs. There are specific man pages for each function mentioned in here. See libcurl-easy(3), libcurl-multi(3), libcurl-share(3), libcurl-url(3), libcurl-ws(3) and libcurl-tutorial(3) for in-depth understanding on how to program with libcurl.TRANSFERS
To transfer files, you create an "easy handle" using curl_easy_init(3) for a single individual transfer (in either direction). You then set your desired set of options in that handle with curl_easy_setopt(3). Options you set with curl_easy_setopt(3) stick. They are then used for every repeated use of this handle until you either change the option, or you reset them all with curl_easy_reset(3).SUPPORT INTERFACES
There is also a series of other helpful functions and interface families to use, including these:- curl_version_info()
- gets detailed libcurl (and other used libraries) version info. See curl_version_info(3)
- curl_getdate()
- converts a date string to time_t. See curl_getdate(3)
- curl_easy_getinfo()
- get information about a performed transfer. See curl_easy_getinfo(3)
- curl_mime_addpart()
- helps building an HTTP form POST. See curl_mime_addpart(3)
- curl_slist_append()
- builds a linked list. See curl_slist_append(3)
- Sharing data between transfers
- You can have multiple easy handles share certain data, even if they are used in different threads. This magic is setup using the share interface, as described in the libcurl-share(3) man page.
- URL Parsing
- URL parsing and manipulations. See libcurl-url(3)
- WebSocket communication
- See libcurl-ws(3)
LINKING WITH LIBCURL
On unix-like machines, there is a tool named curl-config that gets installed with the rest of the curl stuff when 'make install' is performed.LIBCURL SYMBOL NAMES
All public functions in the libcurl interface are prefixed with 'curl_' (with a lowercase c). You can find other functions in the library source code, but other prefixes indicate that the functions are private and may change without further notice in the next release.PORTABILITY
libcurl works exactly the same, on any of the platforms it compiles and builds on.THREADS
libcurl is thread safe but there are a few exceptions. Refer to libcurl-thread(3) for more information.PERSISTENT CONNECTIONS
Persistent connections means that libcurl can reuse the same connection for several transfers, if the conditions are right.GLOBAL CONSTANTS
There are a variety of constants that libcurl uses, mainly through its internal use of other libraries, which are too complicated for the library loader to set up. Therefore, a program must call a library function after the program is loaded and running to finish setting up the library code. For example, when libcurl is built for SSL capability via the GNU TLS library, there is an elaborate tree inside that library that describes the SSL protocol.SEE ALSO
libcurl-easy(3), libcurl-multi(3), libcurl-security(3), libcurl-thread(3)2024-11-21 | libcurl |