WebSocket
A persistent two-way connection between client and server. Like a phone call, not sending letters.

A WebSocket is a persistent, full-duplex connection between client and server: both sides can send messages at any time without the request-response overhead of HTTP. The connection starts as a regular HTTP request, then “upgrades” to the WebSocket protocol. Messages arrive as events, not as responses to requests, making WebSockets ideal for any system where latency matters: live dashboards, chat, multiplayer games, and automation control. Socket.io wraps WebSockets with automatic reconnection, rooms, and HTTP fallback.
How It Works
Client sends Upgrade: websocket header → server agrees → both sides exchange lightweight frames with no per-message overhead → either side closes gracefully when done. Full duplex vs HTTP’s request-then-response half-duplex.
Example
In jobs-apply, Socket.io streams every engine:log event from the server to the browser’s Console tab in real time : you watch applications happen as they occur. In Dakka, Electron’s main process (Gork) uses WebSockets to stream output from spawned Claude Code agents and accept spawn/kill commands. Architecture at Dakka.