Meaning the C10K problem, what is the best way to do asynch I/O on Mac OS X (assume to use on Mac and iPhone/iPad)?
On Linux our choice is epoll, on Windows is I/O Completion Ports.
Top priority is performance and scalability (thousands of connections).
UPDATE
OK. As Darwin is BSD-like system, my common idea is to use kqueue. Is this a right direction? It would be nice to hear from someone experienced in this area.
Thanks
Boost.Asio is an excellent cross platform, high performance, C++ networking library. On Mac OS X it uses kqueue for the reactor event loop, other platforms use epoll, I/O completion ports, poll, or select. It can scale to thousands of connections without issues. As the name implies, it promotes asynchronous programming by using the proactor design pattern for concurrency without the use of threads.
If you use libev, you can switch between a variety of compatible asynchronous IO backends (epoll, kqueue, select, etc...) without worrying about implementation details.
http://software.schmorp.de/pkg/libev.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With