Book Image

Boost.Asio C++ Network Programming

By : Wisnu Anggoro
Book Image

Boost.Asio C++ Network Programming

By: Wisnu Anggoro

Overview of this book

Table of Contents (15 chapters)
Boost.Asio C++ Network Programming Second Edition
Credits
About the Authors
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Exploring the Internet Protocol


IP is a primary communication protocol that is used to deliver a datagram across networks. The datagram itself is a transfer unit associated with a packet-switched network. The role of IP is to deliver packets from the host to the host based on the IP address, which is stated in the packet's header. There are two versions of IP that are commonly used nowadays, which are IPv4 and IPv6.

Internet Protocol Version 4 – IPv4

IPv4 has become the standard IP address since 1980s and is used to obtain TCP/IP traffic from a computer to another over the network. An IP address is unique for every device connected over the Internet, and all devices can communicate with each other over the Internet as long as they have a valid IP address.

A valid IP address is constructed by four decimal numbers that are separated by three dots. The address only contains a decimal number from 0 to 255. We can say that 10.161.4.25 is a valid IP address since it contains four decimal numbers...