⚠️ Maintenance. Notice: the site is currently in maintenance mode, so the amount of available material is temporarily limited.
WebSocket · SSE · WebRTC

Build real-time features in JavaScript the right way.

SocketForge collects practical, production-tested guides on the WebSocket protocol — from your first connection to reconnection logic, binary frames, heartbeats and scaling to thousands of concurrent clients.

Делайте real-time на JavaScript правильно.

SocketForge — это коллекция практических, проверенных в продакшене руководств по протоколу WebSocket: от первого соединения до логики переподключения, бинарных кадров, heartbeat-ов и масштабирования на тысячи одновременных клиентов.

Featured guidesИзбранные руководства

All articles →
Protocol

Heartbeats: ping, pong & keep-aliveHeartbeat: ping, pong и keep-alive

Why idle connections die silently and how a heartbeat keeps proxies and load balancers honest.Почему простаивающие соединения тихо умирают и как heartbeat держит прокси и балансировщики в тонусе.

9 minProtocol
Tutorial

Building a real-time chatСоздаём real-time чат

A broadcasting Node.js server with rooms and a resilient browser client, built on a tiny JSON message protocol.Сервер на Node.js с комнатами и рассылкой и устойчивый браузерный клиент на крошечном JSON-протоколе.

16 minTutorial
Interactive

Try the live playgroundПопробуйте живую песочницу

An in-browser echo client that mirrors the real WebSocket API — connect, send, watch frames.Браузерный echo-клиент, повторяющий настоящий WebSocket API — подключайтесь, шлите, смотрите кадры.

DemoInteractive

Why a persistent connection?

HTTP polling wastes round-trips and adds latency. A WebSocket upgrades a single TCP connection into a full-duplex channel: the server can push the moment something changes, and the client can stream back without re-negotiating headers.

Зачем постоянное соединение?

HTTP-поллинг тратит лишние round-trip-ы и добавляет задержку. WebSocket превращает одно TCP-соединение в полнодуплексный канал: сервер может слать данные в момент изменения, а клиент — отвечать без повторного согласования заголовков.

  • Low latencyНизкая задержка

    No per-message HTTP overhead once the channel is open.Никаких HTTP-накладных на каждое сообщение после открытия канала.

  • Full-duplexПолный дуплекс

    Both sides send whenever they like — chat, games, dashboards.Обе стороны шлют когда хотят — чаты, игры, дашборды.

  • 🔌

    Standard & nativeСтандарт и нативность

    Built into every modern browser — no plugins, no polyfills.Встроен в каждый современный браузер — без плагинов и полифилов.

client.js
// Open a channel and react to server pushes
const ws = new WebSocket("wss://echo.socketforge.dev/v1");

ws.onopen  = () => ws.send("hello");
ws.onmessage = (e) => console.log("server:", e.data);
ws.onclose = (e) => console.log("closed", e.code);

// readyState: 0 CONNECTING · 1 OPEN · 2 CLOSING · 3 CLOSED
10
published guidesопубликованных руководств
100%
vanilla, framework-freeчистый код, без фреймворков
RFC 6455
protocol we followпротокол, которому следуем
2
languages (EN / RU)языка (EN / RU)