Windows 上的 Libev
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8042796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Libev on Windows
提问by Cartesius00
Considering libevent
vs. libev
. Does the libev
library have native support of IOCP on Windows?
考虑libevent
对libev
. 该libev
库是否在 Windows 上原生支持 IOCP?
回答by Remember Monica
both libev and libevent use select on windows to detect and dispatch events (the event core doesn't do I/O, only events).
libev 和 libevent 都在 windows 上使用 select 来检测和调度事件(事件核心不执行 I/O,只执行事件)。
libevent in addition has a socket handle abstraction, which uses iocps on windows to do reads and writes. libev doesn't have anything comparable. the benchmarks seen so far indicate that the iocp backend of libevent is not very fast though, so if you are looking for fast on windows, you better do your own I/O at this point.
此外,libevent 有一个套接字句柄抽象,它在 windows 上使用 iocps 进行读写。libev 没有任何可比的东西。到目前为止看到的基准测试表明 libevent 的 iocp 后端不是很快,所以如果你在 Windows 上寻找快速,你最好在这一点上做你自己的 I/O。