Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
我编写这个程序是为了测试,我能够连接超过 80k 个连接,但我发现平均系统负载仅为 0.27%。
I wrote this program for testing and I was able to connect more than 80k connections and I find average system load only to 0.27%.
这是 Epoll 的介绍,一个非常基本的教程: http:// blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/
可以在此处找到更完整的示例:https://banu.com/blog/ 2/how-to-use-epoll-a-complete-example-in-c/
另外,手册页
Here's an introduction to Epoll, a pretty basic tutorial: http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/
A more complete example can be found here: https://banu.com/blog/2/how-to-use-epoll-a-complete-example-in-c/
Also, the man pages