1. Introduction
The most recent project involved in Ericsson is a data-forwarding program based on the HTTP protocol. The main use of Epoll and Libcurl these two technologies.
I am responsible for the inside of the transmission module, is also the main module of the project. Just use the Libcurl library and use it to combine with the epoll. So basically from the beginning of the architecture design, to development, to performance debugging, bug fix, basically throughout the project development cycle. Limited to the development progress requirements, has been only using Libcurl API, occasionally encountered difficulties, will look at the official document, or a small part of the source code. However, it has not been a good look at its internal implementation mechanism. Now that the project is over, we can study its internal implementation in detail.
2.libcurl Introduction
Libcurl is an open source client URL Transfer library that supports numerous protocols including Dict, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, pop3s, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP.
Libcurl support SSL certificate, HTTP POST, HTTP put,ftp upload, form-based HTTP upload, proxy, http/2, cookies, username + password Authentication (Basic, Plain, Digest, NTLM, etc.), download/ Upload the file to continue the breakpoint, HTTP proxy server pipeline and so on.
The Libcurl is highly portable, can work on different platforms, supports Windows,unix,linux, and so on.
Libcurl is free, thread-safe, IPV6 compatible, and it has many other very rich features. Libcurl has been adopted by many well-known large enterprises and applications.
Related documents and source code can refer to the official link: http://curl.haxx.se/libcurl/
3. Direction
Subsequent articles in this series will focus primarily on the Libcurl related topics listed below:
1). How to use the Select () &poll () in Libcurl.
2). The principle of easy curl and multi curl in Libcurl, the architecture, and the interaction mechanism between them.
3). Explore the implementation mechanism of some important callback functions. For example:
Easy Curl in the
Curlopt_writefunction,
Curlopt_readfunction,
Curlopt_ioctlfunction,
Curlopt_seekfunction,
Curlopt_sockoptfunction,
Curlopt_opensocketfunction,
Curlopt_closesocketfunction,
Curlopt_progressfunction.
and multi curl in the
Curlmopt_socketfunction,
Curlmopt_timerfunction.
4). Explore some important easy curl options and how multi curl option is implemented on the underlying socket.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Libcurl Understanding (1)-Introduction