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

Synchronous I/O in client applications

A synchronous client will usually fall into one of the two cases:

  • It requests something from the server, reads answer, and processes it. Then, ask something else, and so on. This is, in fact, what the synchronous client in the previous chapter is like.
  • Read incoming message from the server, process it, then write answer. Then, read next incoming message, and so on.
    Synchronous I/O in client applications

Both scenarios use a make-request-read-answer strategy. In other words, one party makes a request to which the other party will answer back. This is an easy way to implement a client/server application, and that's what I highly recommend you do.

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