Enter your mobile number below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Kindle Price: £16.79

Save £5.20 (24%)

includes VAT*
* Unlike print books, digital books are subject to VAT.

These promotions will be applied to this item:

Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.

Deliver to your Kindle or other device

Deliver to your Kindle or other device

Boost.Asio C++ Network Programming by [Torjo, John]
Kindle App Ad

Boost.Asio C++ Network Programming Kindle Edition

3.0 out of 5 stars 1 customer review

See all formats and editions Hide other formats and editions
Amazon Price
New from Used from
Kindle Edition
"Please retry"

Kindle Books from 99p
Load up your Kindle library before your next holiday -- browse over 500 Kindle Books on sale from 99p until 31 August, 2016. Shop now

Product Description

About the Author

John Torjo

John Torjo is a renown C++ expert. He has been programming for over 15 years, most of which were spent doing C++. Sometimes, he also codes C# or Java.

He's also enjoyed writing articles about programming in C++ Users Journal (currently, Dr. Dobbs) and other magazines.

In his spare time, he likes playing poker and driving fast cars. One of his freelance projects lets him combine two of his passions, programming and poker. You can reach him at john.code@torjo.com.

Product details

  • Format: Kindle Edition
  • File Size: 1739 KB
  • Print Length: 158 pages
  • Publisher: Packt Publishing (22 Feb. 2013)
  • Sold by: Amazon Media EU S.à r.l.
  • Language: English
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Enhanced Typesetting: Enabled
  • Average Customer Review: 3.0 out of 5 stars 1 customer review
  • Amazon Bestsellers Rank: #730,575 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images or tell us about a lower price?

Customer Reviews

3.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See the customer review
Share your thoughts with other customers

Top Customer Reviews

Format: Paperback Verified Purchase
Firstly the book is a little thin. All topics are covered lightly and you can get the information from around the web fairly easily. As such there was very little wow to the book.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Most Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: HASH(0x90595e88) out of 5 stars 5 reviews
19 of 20 people found the following review helpful
HASH(0x904108c4) out of 5 stars Possibly the first Boost.Asio book 3 April 2013
By Olivier Langlois - Published on Amazon.com
Format: Paperback
I have been offered by the publisher to read and review this book. I was enthousiast as network programming is really something I like and I have heard about Boost.Asio usage in some projects without really having taken the opportunity to check out myself what Boost.Asio really was.

The outcome of having read it is that I was left with a lot more unanswered questions than I have received answers. It is a very short book probably of the style 'hands on' 'direct to the point' type of book which I guess has merits so someone can start reading it and hack something very fast. However, in my opinion, this is overdone making the book a bad choice for learning network programming.

My first unanswered question I had when I picked up the book is Why should I use Boost.Asio and what are its benefits over other existing frameworks? Of course, I know the answer that you can find also in the excellent book Network programming in C++ plus the fact that Boost.Asio is fully integrated with STL but the explanation is totally missing from the book.

Explanation between synchronous and asynchronous is very simplistic and can be resume as 'async is more complex than sync but eventually you will prefer async for performance reasons'. It got me a little confused for knowing that the *nix socket API and the Winsock API you can do:

blocking IO
Nonblocking IO or
async IO

which are three different ways of performing IO. I am guessing that what is really done with Boost.Asio is non blocking IO which is close to real async IO and much more common place but nowhere in the book we take the time to really explain what Boost.Asio is really doing.

Code examples are ok I guess so the author can make his point but I spotted a couple less than perfect code which I think is hurting the book credibility. I know this is a harsh judgement but for a book that aims to teach people how to program you have to be examplar as what you teach will be replicated by your readers. I am expecting perfection from a book examples. The type of code that you stare at for some time without being able to figure out how you could improve it. That is the type of quality that you'll get from a book written by Stroustrup or Stevens.

Here are two examples of what I mean:

if ( std::find(c.buff, c.buff + c.already_read, '\n') < c.buff + c.already_read) {
int pos = std::find(c.buff, c.buff + c.already_read, '\n') - c.buff;

1. It is inefficient to call twice std::find(). Imagine that '\n' is the last character in a 2GB array!
2. comparing iterators with the operator '<' works because in this case the container happens to be a POD array but IMO this is bad style to use STL algorithm in a way that will not works on all containers (ie std::list) when using the more common operator != would achieve the same result.

synchronous server code:

void handle_clients() {
for (int i = 0; i < clients.size(); ++i)
if ( clients[i].sock.available() ) on_read(clients[i]);

This works but polling sockets like crazy and sucking 100% of the processor is not the way to write a server that use synchronous mode. I understand that the book did not aim to be a network programming bible like a Stevens but I would have liked some network theory background. Things such as the different possible server topologies and their benefits drawbacks of each. A very small TCP primer. How TCP connections are established from a client? from a server? I know all that but I tried to have some empathy for the young reader who haven't been exposed to this basic knowledge and since these basics are totally absent from the book, it will be even harder for him to make sense out of the book. This is the first edition so hopefully it will eventually improved.

To conclude, the book has some problems but if you can get a cheap copy it might serve as a very fast introduction to Boost.Asio and get you exposed to the API.
6 of 6 people found the following review helpful
HASH(0x9041087c) out of 5 stars I'm glad ASIO is getting attention... 21 April 2013
By Will McDoe - Published on Amazon.com
Format: Paperback
... but this isn't the attention it deserves.

The good: this is somewhat easier to read than the Asio examples and docs.

The bad: this is a somewhat fluffed version of the Asio examples and docs. There are a lot of assumptions about what the reader does/doesn't know about Asio and the gaps aren't filled in by the book alone.

I picked this book up because Torjo wrote a fantastic logging library back in the day, and Asio being a fantastically powerful library, I expected a fantastically decent book, but I was disappointed (the number of pages should have been an indicator). The examples are different and modestly improved upon what you'd find online in the Asio examples, but as an experienced Asio user, I didn't benefit from the read. When bringing new developers up to speed on Asio, this book didn't fill in the gaps or bring them up to speed (at least that's been my luck so far).

I haven't returned it, but I have lent it out a few times and ultimately its value is modest. It is useful in so far as it fills the instructional role as a container of a few dozen examples that I can point and use while filling in the gaps. But again, it's a supplement, not a primary source (I would like to see that change over time, however - maybe a mulligan edition that's dramatically expanded in size and scope?).

Asio is an amazing library, and an expansive - and consequently an advanced - library, so I support all authors who have published works on this subject. I wish more effort and time was spent on this book before it was pushed out the door. "Introduction to the Boost C++ Libraries; Volume II - Advanced Libraries" seems to be doing a better job of educating people re: Asio (which is surprising because it only has a few chapters on the subject). As things stand, I have both on my shelf as references for new Asio programmers.
6 of 7 people found the following review helpful
HASH(0x90413060) out of 5 stars My thoughts 11 Mar. 2013
By Marc Gregoire - Published on Amazon.com
Format: Paperback
I love the Boost libraries, and I'm interested in network programming, so I decided to read this book. The book has a hands-on approach with a couple of sample programs. What I like is that these sample programs have been structured in such a way so they can be reused for your own projects. They are like skeleton examples, and all source code can be downloaded from the book's website.

The book does not cover any real networking theory. For example don't expect an in-depth discussion of how the TCP, UDP, or ICMP protocols work; that's not the goal of this book. The goal is to show, with practical examples, how to use the Boost.Asio networking library.

While reading chapter 1, my initial reaction to the contents was rather negative. Chapter 1 is a bit convoluted, not so easy to understand, and even has a couple of errors in it. However, subsequent chapters are structured more logically and are understandable, though sometimes a discussion accompanying a piece of code can be a bit brief.

As an introduction to the library, Chapter 3 shows a basic Echo client/server example which is quite good. There is a synchronous and asynchronous TCP implementation of the client and server, and also a synchronous UDP implementation of the client and server. Subsequent chapters implement more useful client/server applications.

The book is not your one-stop destination for everything related to the Boost.Asio library, but it's a great introduction to get you started with the library, to get to know the terminology used in the library, to learn about the difference between synchronous and asynchronous programming, to learn how to use multi-threading using the Boost threading library, and to get nice skeleton applications that you can reuse in your own projects. Several skeleton applications are provided such as synchronous and asynchronous versions, and single-threaded and multi-threaded versions.
1 of 3 people found the following review helpful
HASH(0x9082e81c) out of 5 stars It's okay. 20 Jun. 2013
By Marvin Ottley - Published on Amazon.com
Format: Paperback Verified Purchase
While informative, the ideas behind the design choices are not clearly explained. This book informs the reader that the .Asio is available. It's necessarily clear in its explanation on usage. More examples would have been usefull.
HASH(0x90879084) out of 5 stars Five Stars 3 Jan. 2015
By Vicki J Bolton - Published on Amazon.com
Format: Kindle Edition Verified Purchase
Very helpful
Were these reviews helpful? Let us know
click to open popover