O'Reilly logo

Boost.Asio C++ Network Programming by John Torjo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The asynchronous client/server

And now, for the fun (and hard) part, lets go asynchronous!

When checking out the diagrams, always understand that Boost.Asio means an asynchronous call performed by Boost.Asio. For instance, do_read(), Boost.Asio, and on_read() indicates the logical flow from do_read() to on_read(), but you will never know the time it takes to get to on_read(), you only know that you'll get there.

Asynchronous client

Things are a bit more complicated now but are definitely manageable. And you'll have an application that doesn't block!

Asynchronous client

You should already be familiar with the following code:

#define MEM_FN(x) boost::bind(&self_type::x, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required