Socket I/O模式 epoll、重叠I/O
我正在工作的客户端服务器应用程序,我需要管理多个套接字连接 1000+。
通过探索,我发现重叠 I/O 或完成端口很适合在 Windows 中对多个套接字进行多路分解,而 epoll 在 Linux 上也很不错。
- epoll 与 Windows 中的 Overlapped I/O 或 Completion Port 不同吗?
- 我想使用 boost,因为它可以在 Windows 和 Linux 上运行。
是否可以使用 boost 来实现这些技术(epoll 和重叠 I/O 或完成端口)?
I am working client server application where I need to manage multiple socket connection 1000+.
By exploration I found out the Overlapped I/O or Completion Port is nice to do de-multiplexing multiple socket in Windows and epoll is nice on Linux.
- Is epoll is different from Overlapped I/O or Completion Port in windows.
- I wanted to use boost since it works on both windows and Linux.
Is it possible to implement these techniques (epoll and Overlapped I/O or Completion Port) using boost?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Linux 上的
epoll
实现和 Windows 上的 I/O 完成端口是不同的,但是 Boost.Asio 很好地消除了应用程序的差异。这是 io_service 的全部要点 反应器队列:Windows NT、2000、XP、2003和Vista
解复用机制:
所有异步的完成端口
套接字操作除了
异步连接。
Linux Kernel 2.6
解复用机制:
The implementation of
epoll
on Linux and I/O completion ports on Windows are different, however Boost.Asio nicely abstracts away the differences for your application. This is the whole point of theio_service
reactor queue:Windows NT, 2000, XP, 2003 and Vista
Demultiplexing mechanism:
completion ports for all asynchronous
socket operations except for
asynchronous connect.
Linux Kernel 2.6
Demultiplexing mechanism: