It has almost been 10 months since I published the IOCP server library. This little library has been very useful to me over several C++ projects. It offers impressive scalability on multi-core processors and a simple interface for TCP graceful shutdown (unlike boost ASIO).
I recently found a crash bug where an utility function was copying a non-NULL terminated IP address string. This bug is specific to Unicode build, and has no affect on ANSI build.
Also, I ran CPPCheck against the library. I am proud to say that CPPCheck has reported only one style warning, and this has also been addressed.
Anyway, you may get the latest version of IOCP Server here. Enjoy!
Hi, apart from the TCP graceful shutdown issue you mentioned, any other reasons to use this library over boost ASIO?
Here’s my opinion.
Boost ASIO is a very powerful library packed with features like SSL and timers. In fact, the product I work with use ASIO library in many TCP implementations. However, by dealing with it on a daily basis, I find it far too overengineered and complicated.
For example, here’s ASIO version of async echo server. ~130 lines of code
http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp
Here’s IOCP server’s version – ~30 lines of code
https://askldjd.wordpress.com/2010/10/26/iocp-server-library/
The documentation of ASIO is also poor. The examples they provide in the tutorial doesn’t cover a quarter of its true capabilities.
For my purpose, whenever I need a small TCP server, I use IOCP server library. It is quick to setup with minimum hassle.
If I need more advanced features like cross-platform, SSL, IPv6 and multi-cast, I use ASIO.
Thanks for the interest.
… Alan
Great, thanks for the reply. I also value having to write as little client code as possible, so I’ll check it out.
Hi!
Prompt, how it is easier to adapt your tcp-server to udp-server?
Thank you very march