Learn effective C++ network programming with Boost.Asio and become a proficient C++ network programmer
About This Book
- Learn efficient C++ network programming with minimum coding using Boost.Asio
- Your one-stop destination to everything related to the Boost.Asio library
- Explore the fundamentals of networking to choose designs with more examples, and learn the basics of Boost.Asio
Who This Book Is For
This book is for C++ Network programmers with basic knowledge of network programming, but no knowledge of how to use Boost.Asio for network programming.
What You Will Learn
- Prepare the tools to simplify network programming in C++ using Boost.Asio
- Explore the networking concepts of IP addressing, TCP/IP ports and protocols, and LAN topologies
- Get acquainted with the usage of the Boost libraries
- Get to know more about the content of Boost.Asio network programming and Asynchronous programming
- Establish communication between client and server by creating client-server application
- Understand the various functions inside Boost.Asio C++ libraries to delve into network programming
- Discover how to debug and run the code successfully
Boost.Asio is a C++ library used for network programming operations.
Organizations use Boost because of its productivity. Use of these high-quality libraries speed up initial development, result in fewer bugs, reduce reinvention-of-the-wheel, and cut long-term maintenance costs. Using Boost libraries gives an organization a head start in adopting new technologies.
This book will teach you C++ Network programming using synchronous and asynchronous operations in Boost.Asio with minimum code, along with the fundamentals of Boost, server-client applications, debugging, and more.
You will begin by preparing and setting up the required tools to simplify your network programming in C++ with Boost.Asio. Then you will learn about the basic concepts in networking such as IP addressing, TCP/IP protocols, and LAN with its topologies. This will be followed by an overview of the Boost libraries and their usage.
Next you will get to know more about Boost.Asio and its concepts related to network programming. We will then go on to create a client-server application, helping you to understand the networking concepts. Moving on, you will discover how to use all the functions inside the Boost.Asio C++ libraries. Lastly, you will understand how to debug the code if there are errors found and will run the code successfully.
Style and approach
An example-oriented book to show you the basics of networking and help you create a network application simply using Boost.Asio, with more examples for you to get up and running with Boost.Asio quickly.
Table of Contents
Boost.Asio C++ Network Programming Second Edition
- Table of Contents
- Boost.Asio C++ Network Programming Second Edition
- About the Authors
- About the Reviewers
1. Simplifying Your Network Programming in C++
- Setting up the MinGW compiler and Text Editor
- Using the GCC C++ compiler
- Knowing other important options in the GCC C++ compiler
- Troubleshooting in the GCC C++ compiler
2. Understanding the Networking Concepts
- An introduction to networking systems
- Understanding TCP and UDP
- Exploring the Internet Protocol
- Using TCP/IP tools for troubleshooting
- 3. Introducing the Boost C++ Libraries
4. Getting Started with Boost.Asio
- Getting closer to the Boost.Asio library
- Examining the I/O service in the Boost.Asio library
- Understanding the Boost.Bind library
- Giving some work to the I/O service
5. Delving into the Boost.Asio Library
- Serializing the I/O service work
- Handling exceptions and errors
- Timing the work execution using the timer class
6. Creating a Client-server Application
- Establishing a connection
- Reading and writing to the socket
- Wrapping the network code
- Developing a client and server program
7. Debugging the Code and Solving the Error
- Choosing a debugging tool
- Running the program under GDB
- Solving the error
- What's next?
- Title: Boost.Asio C++ Network Programming - Second Edition
- Release date: September 2015
- Publisher(s): Packt Publishing
- ISBN: 9781785283079