Skip to main content

Command Palette

Search for a command to run...

TCP Working: 3-Way Handshake & Reliable Communication

Published
1 min read
A
CS student and full-stack developer from Pakistan. Building with JavaScript, TypeScript, React, and Node.js. Currently in ChaiCode's Web Dev Cohort 2026.

TCP (Transmission Control Protocol) :

i) This is very Reliable. It transfers data from server to client completely and very carefully.

ii) It transfer data in the same order from server to client without changing or lossing any data packet. It also detect loss of data packets.

iii) It delivers data packets slowly compared to UDP .

iv) It does a synchronous acknowledgment. (3 way Handshake at start and end).

3-way Handshake B/W Server and Client :

Client : Hello, are you listening, Can we talk? (syn)

Server : Yes, we can talk . (syn-ack)

Client : Ok , send me Data Packets of a video . (ack)

This is 3-way handshaking, done at the start and at the end. It is synchronous process.

Transmission Control Protocol (TCP) - GeeksforGeeks

When to use TCP

Use TCP when you want to transfer data completely and in order ( delivery > speed ). It is mostly used for,

  • Websites

  • Emails

  • File transfer

  • Chat apps (WhatsApp, Telegram, etc.)

  • Banking / payment apps

  • APIs

Example:
If one byte of bank transaction is lost, whole transaction will be wrong → so TCP is used.

More from this blog

A

Abdul Rahman

13 posts

Writing about web development as I learn — projects, mistakes, and things worth sharing. CS student. ChaiCode Web Dev Cohort 2026.