simpleServer.cpp
为阻塞的方式selectServer.cpp
为用select
的方式epollServer.cpp
为用epoll
的方式libeventServer.cpp
为用libevent
的方式libevent
文件夹为更多的libevent
示例。
event_config_avoid_method():通过设置避免某种方法来使用其他的方法。
-
修改Linux下的最大打开文件个数
vi /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535 vi /etc/pam.d/login session required pam_limits.so 注销系统,重新登陆即可
-
测试连接数的工具TCP_UDP_PerformanceTest