Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Boost.Asio C++ Network Programming

You're reading from   Boost.Asio C++ Network Programming Learn effective C++ network programming with Boost.Asio and become a proficient C++ network programmer

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785283079
Length 200 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Wisnu Anggoro Wisnu Anggoro
Author Profile Icon Wisnu Anggoro
Wisnu Anggoro
Arrow right icon
View More author details
Toc

Understanding TCP and UDP

As we discussed earlier in this chapter in the Transport layer section, TCP and UDP are the main protocols that are used to transfer data across a network. The delivery mechanisms that they have are different from each other. TCP has acknowledgments, sequence numbers, and flow control in transferring data process to provide a guaranteed delivery, whereas UDP does not provide a guaranteed delivery but provides a delivery with best efforts.

Transmission Control Protocol

TCP performs a three-way handshaking process before the protocol establishes the session. This is done in order to provide a guaranteed delivery. Refer to the following figure to understand the three-way handshaking process:

Transmission Control Protocol

From the preceding image, imagine that Carol's device wants to transfer data to Bryan's device and that they need to perform a three-way handshaking process. First, Carol's device sends a packet to Bryan's device with the synchronize (SYN) flag enabled. Once Bryan...

You have been reading a chapter from
Boost.Asio C++ Network Programming
Published in: Sep 2015
Publisher:
ISBN-13: 9781785283079
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image