WebSocket Playground

One HTTP handshake, then one line that stays open: send, see who may talk on that line, close cleanly or get cut. An interactive WebSocket playground: change…

Why it matters

Chat, live notifications, shared cursors, multiplayer games: all need a server that can speak first. Knowing readyState and how a connection ends keeps you from sending too early, tells a clean close from a cut, and lets you reconnect properly.

The key idea

One HTTP handshake, then one line that stays open

Common mistakes

Try it in this playground