# caozhiyi/CppNet

Cross platform network library with C++11

Repository: https://github.com/caozhiyi/CppNet
Canonical: https://ross.abutalabs.com/products/cppnet
Language: C++
License: BSD-3-Clause
License Family: permissive
Topics: epoll, socket, iocp, kqueue
Last push: 2024-08-16T02:30:31+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3012, "days_push": 748, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1131, forks 252 (observed 2026-08-28T04:03:42.483168+00:00)

## What it is
CppNet is a cross-platform, multithreaded C++11 network library implementing the proactor pattern for asynchronous TCP I/O. It uses epoll, wepoll (IOCP), and kqueue under the hood and exposes a small socket-like callback API supporting IPv4 and IPv6.

## Use cases
- build a high-performance TCP server in C++
- write asynchronous network clients and servers with callbacks
- implement a simple HTTP server on Linux, Windows, and macOS
- handle thousands of concurrent socket connections efficiently
- build an RPC or file-transfer service over TCP
- replace raw epoll/kqueue/IOCP code with a portable abstraction

## When to choose
- you need a lightweight, portable async TCP library in modern C++ with minimal dependencies
- you want proactor-style asynchronous callbacks similar to system socket APIs
- you need cross-platform support for epoll, kqueue, and IOCP/wepoll from one codebase
- you want per-socket memory pooling and time-wheel timers built in

## When to avoid
- you need full-featured application protocols like HTTP/2, TLS, or WebSockets out of the box
- you prefer a large, widely-adopted ecosystem like Boost.Asio with extensive documentation
- your project requires UDP, QUIC, or other non-TCP transports
- you need commercial-grade support or a very large contributor community

## Facets
- artifact type: library
- maturity: active
- function: http-server, websocket, concurrency, networking
- domain: networking, backend, developer-tools, cross-platform
- platform: windows, cpp, cross-platform
- tags: proactor-pattern, epoll, iocp, kqueue, tcp, async-io, event-driven, c++11, timer, memory-pool, linux, macos

## Member repositories
- caozhiyi/CppNet (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:42.483168+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:38:01.192064+00:00, confidence not recorded.
  - readme: https://github.com/caozhiyi/CppNet (fetched 2026-08-28T04:03:42.483168+00:00, sha 0f59a7181812)
- Data as of 2026-08-30T08:39:29.467469+00:00.
