libevent/libevent
GitHub: libevent/libevent
一款轻量级、高性能的事件通知库,旨在简化异步网络编程并自动适配不同操作系统下的最高效 I/O 机制。
Stars: 11861 | Forks: 3465
[](https://github.com/libevent/libevent/actions/workflows/build.yml)
[](https://coveralls.io/github/libevent/libevent)
[](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://libevent.org/doc)
[](https://securityscorecards.dev/viewer/?uri=github.com/libevent/libevent)
# 1. 构建和安装
## CMake (Unix)
```
mkdir build && cd build
cmake .. # Default to Unix Makefiles.
make
make verify # (optional)
```
更多信息请参阅 [Documentation/Building#Building on Unix using CMake](/Documentation/Building.md#building-on-unix-cmake) 。
## CMake (Windows)
安装 CMake:
```
md build && cd build
cmake -G "Visual Studio 10" .. # Or use any generator you want to use. Run cmake --help for a list
cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio.
```
更多信息请参阅 [Documentation/Building#Building on Windows](/Documentation/Building.md#building-on-windows) 。
## 包管理器
你可以使用 [vcpkg](https://github.com/Microsoft/vcpkg) 依赖管理器下载并安装 libevent:
```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install libevent
```
vcpkg 中的 libevent 端口由 Microsoft 团队成员和社区贡献者保持最新。如果版本过时,请在 vcpkg 仓库中 [创建 issue 或 pull request](https://github.com/Microsoft/vcpkg)。
## Autoconf
*注意,自 2.2 版本起已弃用*
```
./configure
make
make verify # (optional)
sudo make install
```
更多信息请参阅 [Documentation/Building#Autoconf](/Documentation/Building.md#autotools-deprecated) 。
# 2. 实用链接:
关于 Libevent 的最新发布版本,请访问官方网站
。
这里有一份相当不错的编写中的手册
。
关于 Libevent 的最新开发版本,通过以下方式访问我们的 Git 仓库
```
$ git clone https://github.com/libevent/libevent.git
```
你可以在此在线浏览 git 仓库:
报告错误、问题或请求新功能:
__补丁__: https://github.com/libevent/libevent/pulls
__错误、功能 [RFC] 和问题__: https://github.com/libevent/libevent/issues
还有一个 libevent-users 邮件列表,用于讨论 Libevent 的使用和开发:
# 3. 致谢
[以下人员](/CONTRIBUTORS.md) 提供了建议、想法、代码或帮助修复了错误。标签:Bash脚本, Bing搜索, CMake, C语言库, Libevent, Linux开发, Socket编程, TCP/IP, vcpkg, Windows开发, 事件通知库, 事件驱动, 子域名枚举工具, 客户端加密, 底层库, 开发框架, 开源组件, 异步I/O, 网络编程, 网络通信, 非阻塞I/O