Skip to content

api-evangelist/websockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebSockets

WebSockets is a communication protocol providing full-duplex communication channels over a single TCP connection, enabling real-time data exchange between client and server. Standardized by RFC 6455 and the WHATWG Living Standard, it is fundamental to modern web architecture and enables reliable bidirectional communication between systems.

Type: Topic Index Specification: RFC 6455 Living Standard: websockets.spec.whatwg.org MDN: WebSockets API

Protocol Overview

WebSocket establishes a persistent connection via an HTTP Upgrade handshake, then provides a lightweight framing layer for bidirectional messages. Key properties:

  • Full-duplex — Both client and server can send at any time
  • Low overhead — 2-10 byte frame headers vs full HTTP headers per request
  • Real-time — Push data from server to client without polling
  • Subprotocols — STOMP, MQTT, GraphQL-WS, JSON-RPC layered on top

Artifacts

AsyncAPI Specifications

JSON Schemas

JSON Structures

JSON-LD Contexts

Examples

Vocabulary

Frame Types

Opcode Type Description
0x0 Continuation Continuation of a fragmented message
0x1 Text UTF-8 encoded text data
0x2 Binary Raw binary data
0x8 Close Connection close control frame
0x9 Ping Keep-alive ping
0xA Pong Keep-alive pong (reply to ping)

Use Cases

  • Real-time chat and collaboration applications
  • Live financial data feeds and trading platforms
  • Online gaming with real-time state synchronization
  • IoT device telemetry and command-and-control
  • Live dashboards and monitoring interfaces
  • Push notifications replacing long-polling

Related Technologies

  • Socket.IO — WebSocket library with fallback transports
  • STOMP — Messaging subprotocol over WebSocket
  • MQTT over WebSocket — IoT messaging
  • GraphQL Subscriptions — Real-time GraphQL over WebSocket
  • Server-Sent Events — One-way server push (lighter alternative)

Maintainers

FN: Kin Lane Email: kin@apievangelist.com

About

WebSockets is a communication protocol providing full-duplex communication channels over a single TCP connection, enabling real-time data exchange between client and server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors