WebSocket

You might say

How does a chat room receive new messages in real time?

A connection that stays open, letting both sides send messages at any timeWhen building live chat or real-time collaborative editing, the client and server need to stay connected. Standard HTTP requests open and close for each question and answer; WebSocket stays open after connecting so either side can send messages at any time. Because persistent connections can drop on network glitches, they typically include heartbeat checks and auto-reconnect logic.
Know first
WebSocket