tags:

views:

428

answers:

2

I've recently bumped into something called IOCP on the windows platform, to be more precise: Input/Output Control Ports. This seems to be the most efficient way to code your server software when it needs to hold thousands of users concurrently. (Correct me if I'm wrong, but thread-per-socket, polling, and asynchronous callbacks (thread on every callback) are not efficient enough.)

I am wondering if there are any 3rd party libraries available that implement this concept. I know the win32 api supplies us with CreateIoCompletionPort, FreeBSD has kqueue and linux in general can use /dev/epoll that works somewhat similarly... But isn't there a crossplatform library (such as boost::thread) that handles this stuff for me?

+3  A: 

Have you looked at boost::asio? I'm not sure if it has all this functionality yet, but I believe that's one of the things it's intended for.

jalf
Now why didn't I think of that :)
Daniel
+1  A: 

libevent works on a number of *nix OSes and also runs on Windows.

Aaron Klotz