Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 6, 2026·3 min de lecture

POCO C++ Libraries — Cross-Platform Network and Application Framework

POCO is a collection of open-source C++ class libraries that simplify building network-centric, portable applications. It provides modules for HTTP, SMTP, FTP, database access, XML/JSON parsing, cryptography, and more, running on desktop, server, mobile, and embedded systems.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
POCO C++ Overview
Commande d'installation directe
npx -y tokrepo@latest install 55aef854-7979-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

POCO (Portable Components) is a mature set of C++ libraries for building network and internet applications across platforms. Licensed under the Boost Software License, it fills the gap between low-level system APIs and heavyweight frameworks by providing clean, consistent C++ interfaces for common infrastructure tasks.

What POCO Does

  • Implements HTTP/HTTPS client and server classes with request routing and middleware support
  • Provides database abstraction (POCO Data) with connectors for SQLite, MySQL, PostgreSQL, and ODBC
  • Handles XML and JSON parsing, generation, and path-based queries
  • Offers cryptographic functions including hashing, encryption, X.509 certificates, and SSL/TLS via OpenSSL
  • Supplies filesystem, process, threading, logging, and configuration utilities across all major platforms

Architecture Overview

POCO is organized into layered modules: Foundation (types, threading, filesystem, logging), Net (sockets, HTTP, SMTP, FTP), Crypto and NetSSL (OpenSSL wrappers), Data (database abstraction), and several auxiliary libraries. Each module builds on Foundation and can be used independently. The design follows classic object-oriented patterns with abstract interfaces and factory methods, making it straightforward to extend components like the HTTP server with custom request handlers.

Self-Hosting & Configuration

  • Build with CMake 3.26+: cmake -S . -B build && cmake --build build
  • Requires a C++17 compiler (GCC, Clang, MSVC) and optionally OpenSSL for TLS support
  • Install via vcpkg: vcpkg install poco or Conan: conan install poco
  • Enable only needed components with CMake flags: -DENABLE_DATA_SQLITE=ON -DENABLE_NET=ON
  • Runs on Linux, macOS, Windows, Android, and embedded Linux platforms

Key Features

  • Comprehensive network protocol support: HTTP/S, FTP, SMTP, POP3, DNS, and WebSocket
  • POCO Data provides a type-safe database abstraction layer similar to JDBC for C++
  • Built-in HTTP server framework with URI routing, session management, and form handling
  • Logging framework with channel-based output (console, file, syslog, Windows Event Log)
  • Active record pattern support for rapid database-backed application development

Comparison with Similar Tools

  • Boost — broader scope but component-by-component; POCO offers an integrated, application-oriented framework
  • Qt — provides GUI along with networking and I/O; POCO is server-focused without GUI dependencies
  • cpp-httplib — single-header HTTP only; POCO covers HTTP plus databases, crypto, and many more protocols
  • Crow/Drogon — modern async HTTP frameworks; POCO uses a traditional threaded model with broader protocol coverage
  • ACE — heavyweight middleware with CORBA heritage; POCO is lighter and more modern in API design

FAQ

Q: Is POCO suitable for embedded systems? A: Yes. POCO supports embedded Linux and can be configured to build only the required modules, minimizing binary size.

Q: Does POCO support async I/O? A: POCO uses a thread-per-connection model with a reactor pattern available in the Net module. It does not use coroutines or io_uring.

Q: How does POCO Data compare to an ORM? A: POCO Data is a database abstraction layer with type-safe binding and extraction. It includes an Active Record generator for ORM-like convenience.

Q: Can I use POCO alongside Boost? A: Yes. POCO and Boost are complementary. POCO focuses on application-level abstractions while Boost provides lower-level library components.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires