<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TCP - Three way handshake]]></title><description><![CDATA[TCP - Three way handshake]]></description><link>https://tcp-3-way-ayush-tomar.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 05:00:26 GMT</lastBuildDate><atom:link href="https://tcp-3-way-ayush-tomar.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Polite Internet: Why Computers "Shake Hands" Before They Talk]]></title><description><![CDATA[Have you ever tried to have a serious conversation in a crowded, noisy room? You don’t just walk up to someone and immediately start whispering secret codes. First, you have to get their attention, make sure they can hear you, and confirm that they a...]]></description><link>https://tcp-3-way-ayush-tomar.hashnode.dev/the-polite-internet-why-computers-shake-hands-before-they-talk</link><guid isPermaLink="true">https://tcp-3-way-ayush-tomar.hashnode.dev/the-polite-internet-why-computers-shake-hands-before-they-talk</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[@hiteshchoudharylco]]></category><category><![CDATA[tcp/ip-model]]></category><category><![CDATA[TCP Handshake]]></category><category><![CDATA[Handshake ]]></category><category><![CDATA[tcp-3-way-handshake]]></category><dc:creator><![CDATA[Ayush Tomar]]></dc:creator><pubDate>Sun, 01 Feb 2026 13:01:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769950829271/ab530141-6d42-41fb-8391-45b3c36ce0ec.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Have you ever tried to have a serious conversation in a crowded, noisy room? You don’t just walk up to someone and immediately start whispering secret codes. First, you have to get their attention, make sure they can hear you, and confirm that they are ready to listen.</p>
<p>Believe it or not, the internet works the exact same way.</p>
<p>Every time you click a link, stream a movie, or send an email, your computer engages in a polite, three-step introduction with a server somewhere else in the world. In the networking world, we call this the <strong>TCP Three-Way Handshake</strong>.</p>
<p>It sounds technical, but it’s actually one of the most human things computers do. Let’s break it down.</p>
<hr />
<h2 id="heading-what-is-tcp-the-reliable-delivery-guy">What is TCP? (The "Reliable Delivery" Guy)</h2>
<p>Before we get to the handshake, we need to know who is shaking hands. <strong>TCP</strong> stands for <strong>Transmission Control Protocol</strong>.</p>
<p>Think of the internet like a postal service. Some protocols just throw mail in the general direction of your house and hope it gets there (that’s called UDP, but that’s a story for another day).</p>
<p>TCP is the "Certified Mail" of the internet. It guarantees that:</p>
<ol>
<li><p>Your data arrives.</p>
</li>
<li><p>It arrives in the correct order.</p>
</li>
<li><p>It’s error-free.</p>
</li>
</ol>
<p>To make those guarantees, TCP can't just start blasting data. It needs to establish a connection first. That’s where the handshake comes in.</p>
<hr />
<h2 id="heading-the-analogy-the-walkie-talkie-check">The Analogy: The Walkie-Talkie Check</h2>
<p>Imagine you (the <strong>Client</strong>) are trying to talk to your friend (the <strong>Server</strong>) using old-school walkie-talkies. You can’t both talk at once, and you need to make sure the channel is open.</p>
<p>Here is how the conversation goes:</p>
<ol>
<li><p><strong>You:</strong> "Hey, are you there? Over."</p>
</li>
<li><p><strong>Friend:</strong> "I hear you! I'm here. Can you hear me? Over."</p>
</li>
<li><p><strong>You:</strong> "Loud and clear. Let's talk."</p>
</li>
</ol>
<p>That is literally the three-way handshake.</p>
<hr />
<h2 id="heading-the-technical-translation-step-by-step">The Technical Translation (Step-by-Step)</h2>
<p>Now, let’s swap the walkie-talkie talk for computer terms. Computers use "Flags" (tiny bits of data) to signal their intent.</p>
<ul>
<li><p><strong>SYN</strong> (Synchronize): "I want to start a connection."</p>
</li>
<li><p><strong>ACK</strong> (Acknowledge): "I received your message."</p>
</li>
</ul>
<p>Here is what happens when you type <a target="_blank" href="http://google.com"><code>google.com</code></a> into your browser:</p>
<h3 id="heading-step-1-the-introduction-syn">Step 1: The Introduction (SYN)</h3>
<p>Your computer (the Client) sends a packet to the server with the <strong>SYN</strong> flag turned on.</p>
<blockquote>
<p><strong>Translation:</strong> "Hi Server! I’d like to set up a connection with you. My Sequence Number is X."</p>
</blockquote>
<h3 id="heading-step-2-the-agreement-syn-ack">Step 2: The Agreement (SYN-ACK)</h3>
<p>The Server receives your packet. It opens a port for you and replies with two flags: <strong>SYN</strong> (to start its side) and <strong>ACK</strong> (to confirm it heard you).</p>
<blockquote>
<p><strong>Translation:</strong> "Hello Client! I acknowledge your request (<strong>ACK</strong>). I am also ready to connect with you (<strong>SYN</strong>)."</p>
</blockquote>
<h3 id="heading-step-3-the-confirmation-ack">Step 3: The Confirmation (ACK)</h3>
<p>Your computer receives the server's message. It sends back one final packet with the <strong>ACK</strong> flag.</p>
<blockquote>
<p><strong>Translation:</strong> "Awesome, I received your reply. We are now connected!"</p>
</blockquote>
<p>Once this third step is done, the "handshake" is complete. The connection is established, and now your browser can actually request the webpage, and the server can send the data.</p>
<hr />
<h2 id="heading-why-do-we-need-to-do-this">Why do we need to do this?</h2>
<p>You might wonder, <em>“Why three steps? Why not just two?”</em></p>
<p>If we only did two steps, the server would say "Okay, I'm ready!" but would never know if you actually heard that confirmation. If your internet cut out right after step 1, the server would be sitting there keeping a connection open for a ghost, wasting memory and processing power.</p>
<p>The third step proves that the line is open in <strong>both directions</strong>.</p>
<h2 id="heading-summary">Summary</h2>
<p>Next time you see a webpage loading, take a split second to appreciate the manners involved. Before a single pixel of that cat video loads, your computer and the server have already met, introduced themselves, shook hands, and agreed to start talking.</p>
<p>It’s the polite foundation that keeps the internet reliable.</p>
]]></content:encoded></item></channel></rss>