Chapter 1. The Basics

In this chapter, we will cover:

  • Creating an endpoint
  • Creating an active socket
  • Creating a passive socket
  • Resolving a DNS name
  • Binding a socket to an endpoint
  • Connecting a socket
  • Accepting connections

Introduction

Computer networks and communication protocols significantly increase capabilities of modern software, allowing different applications or separate parts of the same application to communicate with each other to achieve a common goal. Some applications have communication as their main function, for example, instant messengers, e-mail servers and clients, file download software, and so on. Others have the network communication layer as a fundamental component, on top of which the main functionality is built. Some of the examples ...

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.