Introduction to linux curl and compilation in linux

Source: Internet
Author: User
Tags curl options

Libcurl API official documentation http://curl.haxx.se/libcurl/c/

1. Introduction

Curl is a File Transfer tool that uses the URL syntax to work under the command line. It also provides many interfaces that can be used in programming, with powerful functions.

2. Summary

Easy interface, single-Thread Programming Model

Multi interfaces are multi-threaded analog interfaces used in a single-threaded environment to achieve multi-threaded execution.

The share interface supports multi-thread concurrent operations of some protocols. Currently, only DNS and cookies are supported.

3. Specific Interfaces

Curlcode curl_global_init (long flags); // curl_global_nothing uses curl_global_ssl When SSL is not used

Curlcode curl_global_clean (); // initialize

Reference http://blog.csdn.net/dqvega/article/details/6960772

Curl_easy_init (); // generate a session handle

Curl_easy_setopt (); // sets the curl Option

Curl_easy_perform (); // execute the set curl_easy_setopt Option

When the curlopt_connect_only attribute is set, the function only establishes a socket connection.

Implemented by curl_easy_send and curl_easy_recv

Curl_easy_getinfo ();

Http://www.cppblog.com/qiujian5628/archive/2008/06/28/54873.html

Curl options

Http://hi.baidu.com/pavelliu/blog/item/06709625d974166534a80fbd.html

4. in Linux (centos 6.2)

Install curl and libcur

Yum install curl-devel

Compile

Gcc-l curl-O filename. c

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.