Section: IT & Technology · Web DevelopmentDifficulty: Medium

WebSocket

USUK

A communication protocol providing full-duplex communication channels over a single TCP connection.

Also: WS

Definition

WebSocket is a communication protocol that provides full-duplex (bidirectional), real-time communication channels over a single, long-lived TCP connection. Unlike HTTP, which is request-response, WebSocket allows the server to push data to the client at any time without the client polling. WebSockets are ideal for real-time applications such as chat applications, live sports scores, collaborative editing, stock tickers, and online gaming. The connection is established via an HTTP upgrade handshake.

Example

A stock trading platform uses WebSocket so the server can instantly push price updates to thousands of traders' browsers the moment prices change.

Synonyms

  • real-time socket
  • bidirectional connection
  • persistent connection
  • full-duplex channel

Antonyms / Opposites

  • HTTP polling
  • short-lived connection
  • request-response

Images

CC-licensed · free to use
More on Wikimedia
Loading images…

Video

  • http
  • tcp-ip
  • real-time
  • server-sent-events

Dictionary Entry

Back to IT & Technology