When you send a message across the Internet, it does not travel as one big chunk. Instead, it gets split into small pieces called . Each packet is numbered so the receiving device can put them back together in the correct order.
Example: Sending "Hello World"
Each packet has a sequence number (#1, #2, #3) so the receiver knows the correct order.
Every packet has two parts: a header (metadata about the packet) and a payload (the actual data). Think of it like a letter in an envelope: the envelope has the address and tracking info, and the letter inside is the content.
Example: Packet #2 of "Hello World"
192.168.1.5
74.125.24.100
TCP
#2 of 3
52431
443 (HTTPS)
Header: about the packet: where it came from, where it is going, and how to deliver it.
" Worl"
5 bytes of the original message
Payload: The actual chunk of the message being delivered.
Header: about the packet: where it came from, where it is going, and how to deliver it.
Payload: The actual chunk of the message being delivered.
There are two main for sending packets:
TCP (Reliable)
Used for: web pages, email, file downloads
UDP (Fast)
Used for: video streaming, gaming, voice calls