Monday, July 21, 2008

Boost::asio and Keep-alive

Boost::Asio is a very useful framework for portable networking. Same code can be used for all the unicies variants, macos and windows. Support for asynchronous IO is remarkable. It is possible to write a generic server and, then, specialize the framework for specific use. In this code, I experimented with portable keep-alive support using async no-op read() and asio timeout.