# ithewei/libhv

🔥 比libevent/libuv/asio更易用的网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT/Redis client/server.

Repository: https://github.com/ithewei/libhv
Canonical: https://ross.abutalabs.com/products/libhv
Homepage: https://github.com/ithewei/libhv/wiki
Language: C
License: BSD-3-Clause
License Family: permissive
Topics: https, http-client, http-server, websocket, websocket-client, websocket-server, webserver, epoll, curl, openssl, requests, wrk, kcp, mqtt, iocp, redis
Last push: 2026-08-24T05:20:20+00:00

## Health v2 (maintenance only)
Score: 72/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 21, longevity 100
- inputs: {"age_days": 2927, "days_push": 9, "days_rel": 312, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7539, forks 1362 (observed 2026-08-28T04:10:00.637953+00:00)

## What it is
libhv is a cross-platform C/C++ network library providing an event loop with non-blocking IO and timers, similar to libevent/libuv but with a simpler API and richer built-in protocols. It supports TCP/UDP/SSL client and server development plus HTTP, WebSocket, MQTT, and Redis clients/servers.

## Use cases
- build a high-performance HTTP server in C++
- write a WebSocket client or server in C
- develop TCP/UDP client and server applications with an event loop
- create an MQTT client for IoT devices
- make HTTP requests from C++ like curl or python requests
- build a RESTful API service with routing and middleware
- implement a reverse or forward proxy server

## When to choose
- you want a simpler API than libevent/libuv/asio for network programming
- you need multiple protocols (HTTP, WebSocket, MQTT, Redis) in one lightweight C/C++ library
- you need cross-platform support including mobile (Android/iOS)
- you are building IoT or embedded network services in C/C++

## When to avoid
- you are working in a higher-level language like Python, Go, or Node.js
- you need an extremely battle-tested ecosystem with large community support like libuv or asio
- you only need a full-featured production web server rather than a library to build one
- you need HTTP/3 or QUIC support

## Facets
- artifact type: library
- maturity: active
- function: http-client, http-server, websocket, networking, rpc, middleware, routing, caching
- domain: networking, backend, web-development, iot, developer-tools, cross-platform
- platform: windows, cross-platform, c, cpp
- tags: event-loop, tcp, udp, ssl, mqtt, redis-client, kcp, epoll, iocp, nonblocking-io, libuv-alternative, linux, macos, android, ios

## Member repositories
- ithewei/libhv (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:00.637953+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-29T17:37:25.970782+00:00, confidence not recorded.
  - readme: https://github.com/ithewei/libhv (fetched 2026-08-28T04:10:00.637953+00:00, sha 22b6553e28ce)
  - homepage: https://github.com/ithewei/libhv/wiki (fetched 2026-08-29T08:32:30.417276+00:00, sha e7f26ae1b62a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
