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

Network I/O using Asio


We want to use Asio to build scalable network services that perform I/O over the network. Such services receive requests from clients running on remote machines and send them information over the network. The data transfer between processes across machine boundaries, happening over the wire, is done using certain protocols of network communication. The most ubiquitous of these protocols is IP or the Internet Protocol and a suite of protocols layered above it. Boost Asio supports TCP, UDP, and ICMP, the three popular protocols in the IP protocol suite. We do not cover ICMP in this book.

UDP and TCP

User Datagram Protocol or UDP is used to transmit datagrams or message units from one host to another over an IP network. UDP is a very basic protocol built over IP and is stateless in the sense that no context is maintained across multiple network I/O operations. The reliability of data transfer using UDP depends on the reliability of the underlying network, and UDP transfers...