最近在开发im服务器 需要大并发链接 QT默认的是使用select模型的 这种轮询方式非常慢 在高并发连接 我们需要epoll才能发挥linux服务器的性能 而且使用简单 整个服务端代码架构无需修改 直接可以使用 只要在 main文件添加: int main int argc char argv[] { #ifdef Q OS LINUX QCoreApplication::setEventDispatcher new EventDispatcherLibEvent ; qInstallMessageHandler customMessageHandler ; #endif QCoreApplication a argc argv ; auto ser new ConfigServer; ser >startServer ; return a exec ; } 在 pro文件添加 linux{ LIBS + levent core SOURCES + common eventdispatcher libevent eventdispatcher libevent cpp common eventdispatcher libevent eventdispatcher libevent config cpp common eventdispatcher libevent eventdispatcher libevent p cpp common eventdispatcher libevent socknot p cpp common eventdispatcher libevent tco eventfd cpp common eventdispatcher libevent tco pipe cpp common eventdispatcher libevent tco cpp common eventdispatcher libevent timers p cpp HEADERS + common eventdispatcher libevent common h common eventdispatcher libevent eventdispatcher libevent h common eventdispatcher libevent eventdispatcher libevent config h common eventdispatcher libevent eventdispatcher libevent config p h common eventdispatcher libevent eventdispatcher libevent p h common eventdispatcher libevent libevent2 emul h common eventdispatcher libevent qt4compat h common eventdispatcher libevent tco h common eventdispatcher libevent wsainit h } 可以直接跨平台了使用了 csdn博客:http: blog csdn net rushroom">最近在开发im服务器 需要大并发链接 QT默认的是使用select模型的 这种轮询方式非常慢 在高并发连接 我们需要epoll才能发挥linux服务器的性能 而且使用简单 整个服务端代码架构无需修改 直接可以使用 只要在 main文件添加: [更多]
2025-06-21 17:16:49 19KB libevent epoll
1
qt_eventdispatcher_libevent  是基于 Libevent 的 Qt 事件调度器 特点 非常快速 支持Qt4和Qt5 不需要Qt的私有头文件 通过Qt4 和 Qt5 的事件调度,事件循环,定时器和socket通知测试
2025-06-21 17:14:23 30KB 开源项目
1
编译好的libevent 2.1.12&openssl3
2024-06-23 20:00:23 3.38MB libevent
1
基于vs2008创建的libevent项目,只依赖于libevent库,如果下载编译不过。请按照sp1插件。(主要由于我自己编译环境带有sp1)
2024-03-15 13:27:13 1.75MB vs2008
1
Libevent高清原版帮助文档, chm格式的sdk开发文档。 对学习和使用event很有帮助。
2024-03-03 20:30:43 114KB Libevent
1
libevent-2.1.12-stable.tar.gz
2024-01-16 16:07:51 1.05MB libevent io
1
fastdfs离线安装,包含gcc离线安装和libevent离线安装
2022-09-21 22:02:21 37.46MB fastdfs
1
在windows平台下,mingw编译libevent有些问题,如何在Qt使用mingw编译器构建项目时,调用libevent库呢?本文测试了一种方法:先用vs2015编译好libevent,再开发一个dll调用libevent,在dll中实现网络相关接口(开启监听、接收连接、停止监听等);然后再构建Qt工程(mingw),在Qt中调用dll中的相关接口,实现TCP服务端。
2022-09-15 10:05:56 1.09MB 网络 c++ libevent tcp
1
在ubuntu里面使用 libevent 实现,作为
2022-07-05 16:17:21 4KB 串口通信 tcpip
1
在linux下C语言通过libevent操作串口,通过libevent来实现回调读取串口数据。全部C代码,可直接编译和测试。
2022-07-05 16:15:19 3KB linux C libevent 串口
1