Back to list
Lv.3

WebSocket

WebSocket

A technology that keeps a persistent connection between a client and server, enabling real-time two-way communication.

In Simple Terms

WebSocket keeps a persistent connection between client and server, enabling real-time two-way communication. With a regular website, the page only updates when you actively ask the server for new data. With WebSocket, it's like staying on an open phone call — the server can instantly push updates like "new message!" to you, making it ideal for chat apps and online games that need live data.

Behind the Name

The name combines "Web" and "Socket." A socket is a connection point that links programs over a network. It's called WebSocket because it uses this kind of connection point on the Web to let data flow freely in both directions.

Take a Closer Look!

WebSocket is a technology that enables real-time, two-way communication between a client — such as a web browser — and a server.
Once the connection is established, the channel stays open continuously, like a phone call that never hangs up.

The standard HTTP protocol used for web pages works on a request-response model: you ask for something and the server replies, one exchange at a time.
If you want new information, you have to send another request.

With WebSocket, the server can push data to the client at any time, without waiting for a request.
This means chat messages appear the moment they arrive and opponent moves in multiplayer games are reflected in real time — no constant polling needed.

Once the connection is open, data flows in both directions without repeated handshake overhead, making communication highly efficient.
WebSocket is widely used wherever real-time responsiveness matters — especially in chat apps, live collaboration tools, and online games that demand fast, continuous data exchange.