Skip to main content
Home/Glossary/WebSocket

WebSocket

WebSocket is a web communication protocol that allows a persistent, bidirectional connection between a client (such as a browser) and a server, enabling real-time, efficient data exchange.

How it works

Unlike traditional HTTP requests, once a WebSocket connection is established, both sides can send data at any time without repeatedly opening new connections, which greatly reduces latency and communication overhead. This is essential for applications that require instant data push, such as online chat or real-time games.

Examples

  • 1.Web-based online chat rooms or instant messaging tools
  • 2.Real-time price feeds for stock tickers or financial trading platforms
  • 3.Real-time state synchronization in multiplayer online games

Related Terms