WebSocket
AdvancedA protocol for sending messages both ways, in real time, over a single TCP connection.
WebSocket is a standard protocol published by the IETF in 2011 (RFC 6455). Ordinary HTTP is “the client asks once, the server answers once”; the server can't push data on its own. WebSocket starts with a single HTTP request that upgrades the connection, after which both sides can send each other messages at any time over the same TCP connection, with low overhead and low latency, and ready-made libraries exist for browsers and nearly every language. It's used widely in robotics software: rosbridge uses it to expose ROS topics to web pages, Foxglove's live connection is also built on it, and some VLA projects use it to move observations and actions between a GPU server and a robot. Because it's built on TCP, a dropped packet triggers a retransmission wait; high-bitrate video streaming usually switches to WebRTC instead.
Exampleopenpi starts a WebSocket policy server on a GPU server; on every step, the robot sends over an image and its joint state, and gets back an action chunk to execute.
- Also called
- WS
- Related
- Policy Server (Remote Inference) · rosbridge · Foxglove Studio · openpi (Physical Intelligence) · Web Real-Time Communication (WebRTC) · gRPC Remote Procedure Calls
- Sources
- RFC 6455: The WebSocket Protocol
The WebSocket API — MDN