<?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 UDP]]></title><description><![CDATA[TCP UDP]]></description><link>https://nandtcpudp.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 15:02:35 GMT</lastBuildDate><atom:link href="https://nandtcpudp.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[TCP and UDP]]></title><description><![CDATA[What are TCP and UDP?
TCP → reliable, ordering of packets maintained, loss detection => Retransmission possible, Congestion control
TCP happens through 3 way handshake

UDP :-Less reliable (not unreliable😅)NO retransmission if data packets lostvery ...]]></description><link>https://nandtcpudp.hashnode.dev/tcp-and-udp</link><guid isPermaLink="true">https://nandtcpudp.hashnode.dev/tcp-and-udp</guid><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Nand Kishore]]></dc:creator><pubDate>Fri, 30 Jan 2026 15:18:46 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-what-are-tcp-and-udp"><strong><mark>What are TCP and UDP?</mark></strong></h2>
<h3 id="heading-tcp-reliable-ordering-of-packets-maintained-loss-detection-gt-retransmission-possible-congestion-control">TCP → reliable, ordering of packets maintained, loss detection =&gt; Retransmission possible, Congestion control</h3>
<p>TCP happens through 3 way handshake</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769786032543/135ef2f7-58b9-43ae-8eff-61271e980197.png" alt class="image--center mx-auto" /></p>
<p>UDP :-<br />Less reliable (not unreliable😅)<br />NO retransmission if data packets lost<br />very fast<br />no 3 way handshake.</p>
<h2 id="heading-key-differences-between-tcp-and-udp"><mark>Key differences between TCP and UDP</mark></h2>
<p>TCP is reliable and more safe but UDP is fast (the main key difference)</p>
<h2 id="heading-when-to-use-tcp"><mark>When to use TCP</mark></h2>
<p>When you want a secure connection between server and client. USE TCP.<br />When you want very high speed then use UDP.</p>
<h2 id="heading-common-real-world-examples-of-tcp-vs-udp"><mark>Common real-world examples of TCP vs UDP</mark></h2>
<p>Real world examples :-</p>
<ol>
<li><p>TCP → Whatsapp chat → We definitely dont want my chats getting leaked to someone else.</p>
</li>
<li><p>UDP → In game where latency matters like pubg, free fire etc. OR in live matches of IPL where its not possible to establish a connection between so many users in lakhs.</p>
</li>
</ol>
<h2 id="heading-what-is-http-and-where-it-fits"><mark>What is HTTP and where it fits</mark></h2>
<p>HTTP is a protocol which tells how data will flow from server to client.</p>
<h2 id="heading-relationship-between-tcp-and-http"><mark>Relationship between TCP and HTTP</mark></h2>
<p>TCP tells that how the data will be sent and HTTP is what data will be sent. Thus, http has various requests like GET, POST, PUT etc. so http and tcp goes hand in hand</p>
]]></content:encoded></item></channel></rss>