Chapter 4. Implementing Server Applications

In this chapter, we will cover the following topics:

  • Implementing a synchronous iterative TCP server
  • Implementing a synchronous parallel TCP server
  • Implementing an asynchronous TCP server

Introduction

A server is a part of a distributed application that provides a service or services that are consumed by other parts of this application—clients. Clients communicate with the server in order to consume services provided by it.

Usually, a server application plays a passive role in the client-server communication process. During start-up, a server application attaches to a particular well-known port (meaning, it is known to the potential clients or at least it can be obtained by the clients at runtime from some ...

Get Boost.Asio C++ Network Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.