Jump to ratings and reviews
Rate this book

Boost.Asio C++ Network Programming

Rate this book
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 In Detail 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.

200 pages, ebook

First published January 1, 2013

5 people are currently reading
24 people want to read

About the author

John Torjo

1 book

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (41%)
4 stars
8 (33%)
3 stars
3 (12%)
2 stars
2 (8%)
1 star
1 (4%)
Displaying 1 - 6 of 6 reviews
Profile Image for Brian Salehi.
48 reviews9 followers
April 18, 2021
Don't get me wrong, that one star is the least rate I can give, and that only one star goes to the last chapter, seven, which gives a good overview of working with gdb which is totally irrelevant to the title of the book.
The code sample is messy and explanations are not comprehensive.
The writer is struggling to explain something new to the reader and he fails, while the whole book is as simple as 30 lines of code.
What makes teaching this topic challenging is that every detail needs deep explanations, e.g. threads, mutex, asynchronous processing and network socket interface.
I will update this review and suggest better resources for reading Boost. Asio.
1 review
March 17, 2013
Assynchronous programming is now becoming a must and apparently all languages are creating resources to make such programming paradigm easier or, at least, less hard.

In C++, the standard and multiplatform approach is to use Boost.Asio, which is detailed in the book.

What can I say? Most of the book deals with an advanced topic, so I consider this book good to those with a good background in C++ but without a background in Asio and asynchronous programming.

The pros I see on the book:

It has many code samples, some of which we can say are fully working applications;
It present both synchronous and as\synchronous examples of Asio (I consider it strange that Asio has synchronous functions but, as it has, the book does a good thing by presenting them);
It shows and explains how asynchronous code can be served by a single thread or by many threads;
It presents how the Asio is not limited to networking (even if that it's main use).
The cons I see on the book

Nothing is perfect... or, at least, it is hard to find something that two persons will agree as being "perfect". To me, the weak points are:

The book apparently tries to show how easy Asio is, which seems something beginners could use. Asio can be easier than other asynchronous libraries, but it is still not something we expect beginners to use;
I think the timeout examples are a bit misleading, as timeouts are not expected to be very short and because in the examples they are not destroyed when the action finishes on time, they will simple run later and do nothing;
I would prefer less advanced topics and more on co-routines, as I know that co-routines can make asynchronous programming really easier, but the topic was too short on the book.
As I said, it is hard to agree in what is good or not.

I consider this a good book even if I disagree on some points. I can say that it is a 8 out of 10 for me.
13 reviews
July 9, 2013
I have been working in game development for a while now and the longer I work the more I feel like knowing more about network development specifically in games and similar application. I have read a lot about network programming and this laid a great foundation for reading this book. You can use Boost.Asio to write client code as well as server code, it makes it a lot easier than writing your own TCP and UDP libraries.

The book is well organized with a great introduction to the basics of synchronous and asynchronous networking although if you don't know your way around TCP and UDP you might want to do some extra reading before picking up this book. Boost.Asio C++ Network Programming does have a good introduction to how to use the Boost.Asio libraries.

The installation of Boost.Asio is not covered at all but you can find a good guide online by just searching for it.

The book covers the use of Boost.Asio in great detail from a small "hello world" equivalent for network programmers showing synchronous and asynchronous implementations for it. The examples of more complex code is quite interesting and can easily be adapted for future use in your own projects.

There is a very small section on SSL but if are familiar with the principals it you can see how everything fit together.

I recommend this book as a guide to using Boost.Asio but if you are new to network programming in general this book is not for you.
Profile Image for Brian Salehi.
19 reviews2 followers
September 24, 2023
This is the least I can rate this book.
There are so many things wrong with this book I can't even explain properly. Bad code, wrong implementations, misleading explanations, off topic chapters, impractical examples, deprecated libraries.
Just don't read this book. Read the Boost manual. https://boost.org
Profile Image for Mishal Shah.
1 review58 followers
September 8, 2020
Covers a good introduction about Boost and is filled with examples to get hands-on experience!
Displaying 1 - 6 of 6 reviews

Can't find what you're looking for?

Get help and learn more about the design.