O'Reilly logo

Boost.Asio C++ Network Programming by John Torjo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

The Networking API is rather vast. This chapter was implemented as a reference, which you should come back to, while implementing your own networking applications.

Boost.Asio implemented the concept of endpoints, which you can think of as an IP and a port. If you don't know the exact IP, you can use a resolver object to turn a hostname, such as www.yahoo.com into one or several IPs.

We've also seen the socket classes, which are at the core of the API. Boost.Asio provides implementations for TCP, UDP, and ICMP, but you can extend it with your own protocols; it's not a job for the faint-hearted, though.

Asynchronous programming is a necessary evil. You've seen why you sometimes need it, especially when writing servers. Usually, you'll be happy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required