Read OSS

curl/curl

6 articles

Prerequisites

01

Architecture Overview and Navigating the curl Codebase

A guided tour of curl's dual-product architecture, directory layout, core data structures, and the three architectural pillars that power every transfer.

02

The Multi State Machine — How Every Transfer Executes

Tracing a curl transfer's complete lifecycle through 16 states, from INIT to COMPLETED, revealing the single execution engine at the heart of libcurl.

03

Connection Filters — The Stackable I/O Architecture

Dissecting curl's connection filter system: composable, stackable I/O filters from TCP sockets through TLS to HTTP/2 multiplexing.

04

TLS Backends, DNS Resolution, and Connection Pooling

How curl abstracts 7+ TLS backends, three DNS resolver strategies, and a sophisticated connection pool behind clean vtable interfaces.

05

Protocol Handlers — From HTTP to MQTT

How curl's two-tier protocol handler design supports 28+ URI schemes through composable vtables, client reader/writer stacks, and dual-socket protocols.

06

The curl Command-Line Tool and the Test Suite

How the curl CLI translates 250+ options into libcurl API calls, and how 1978 test cases in a custom Perl harness validate the entire stack.