Skip to content

TCP

Transmission Control Protocol

Medium — good to knowNetworking

ELI5 — The Vibe Check

TCP is like sending a package with delivery confirmation. The sender and receiver shake hands first, then every chunk of data is numbered and confirmed received. If anything goes missing, it gets resent. Very reliable, but a tiny bit slow.

Real Talk

TCP is a connection-oriented transport-layer protocol that guarantees reliable, ordered, and error-checked delivery of data. It uses a three-way handshake to establish connections and acknowledgment packets (ACKs) to confirm delivery.

Show Me The Code

// Node.js TCP server
const net = require('net');
const server = net.createServer((socket) => {
  socket.write('Hello from TCP server!');
  socket.on('data', (data) => console.log(data.toString()));
});
server.listen(3000);

When You'll Hear This

"HTTP runs on top of TCP." / "TCP guarantees packet delivery, unlike UDP."

Made with passive-aggressive love by manoga.digital. Powered by Claude.