Socket I/O mode epoll,overlapped 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 techn开发者_运维问答iques (epoll and Overlapped I/O or Completion Port) using boost?
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 the io_service
reactor queue:
Windows NT, 2000, XP, 2003 and Vista
Demultiplexing mechanism:
- Uses overlapped I/O and I/O completion ports for all asynchronous socket operations except for asynchronous connect.
- Uses select for emulating asynchronous connect.
Linux Kernel 2.6
Demultiplexing mechanism:
- Uses epoll for demultiplexing.
精彩评论