ithewei/libhv

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

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 34 minutes ago
Added to GitGenius on September 8th, 2026
Created on August 28th, 2018
Open Issues & Pull Requests: 41 (+0)
GitHub issues: Enabled
Number of forks: 1,363
Total Stargazers: 7,547 (+0)
Total Subscribers: 137 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 14
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 548 days
Stale 30+ days: 12
Stale 90+ days: 11

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • question (2)
  • enhancement (1)
  • help wanted (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

libhv is a C/C++ network library for building TCP/UDP/SSL/HTTP/WebSocket/MQTT/Redis client and server applications.

The tool addresses the complexity of event-driven network programming by providing a simpler API than libevent, libev, or libuv while supporting a broader range of protocols. It implements a high-performance event loop handling IO, timers, idle callbacks, and signals, with built-in support for common message unpacking modes including fixed-length, delimiter-based, and length-field formats. The library abstracts away platform differences across Linux, Windows, macOS, Android, iOS, BSD, and Solaris through a unified interface.

Developers should choose this tool if they need straightforward protocol support without the learning curve of lower-level event libraries. It suits projects requiring HTTP servers with features like static file serving, reverse proxying, middleware, chunked transfer, and server-sent events; WebSocket communication; MQTT client functionality; or Redis client operations. The HTTP client API follows Python requests conventions, while the server API mirrors Go's gin framework, making it accessible to developers familiar with those ecosystems. For those evaluating alternatives, the README explicitly positions libhv as simpler than libevent, libev, and libuv while offering richer built-in protocol support.

The project maintains active development with regular commits across multiple build systems including Makefile, CMake, Bazel, vcpkg, and xmake. Examples span both C and C++ implementations, covering TCP/UDP servers and clients, HTTP and WebSocket services, Redis operations, MQTT messaging, and proxy servers. The codebase includes multi-threaded patterns demonstrating acceptor-worker thread pools and multi-process configurations. Optional features like KCP support, multiple TLS backends, and Redis functionality can be enabled at build time, indicating a modular approach to dependencies.