Book Image

Learning Boost C++ Libraries

By : Arindam Mukherjee
Book Image

Learning Boost C++ Libraries

By: Arindam Mukherjee

Overview of this book

Table of Contents (19 chapters)
Learning Boost C++ Libraries
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 11. Network Programming Using Boost Asio

In today's networked world, Internet servers handling thousands of requests per second have a tough mandate to fulfill—of maintaining responsiveness and not slowing down even with increasing volumes of requests. Building reliable processes that efficiently handle network I/O and scale with the number of connections is challenging because it often requires the application programmer to understand the underlying protocol stack and exploit it in ingenious ways. What adds to the challenge is the variance in the programming interfaces and models for network programming across platforms, and the inherent difficulties of using low-level APIs.

Boost Asio (pronounced ay-see-oh) is a portable library for performing efficient network I/O using a consistent programming model. The emphasis is on performing asynchronous I/O (hence the name Asio), where the program initiates I/O operations and gets on with its other jobs, without blocking for the OS to return...