videocalling
WebSocket

WebSocket

Protocol

A communication protocol that provides full-duplex communication channels over a single TCP connection.

What is WebSocket?

WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. In the context of WebRTC, WebSocket is the most common transport protocol used for Signaling—the process of setting up and managing the call before the peer-to-peer connection is established.

Why WebSocket?

  • Real-time: Unlike HTTP, which requires a new request for every message, WebSocket keeps the connection open, allowing messages (like "User A is calling") to be pushed instantly.
  • Bi-directional: Both the client and server can send data at any time.
  • Low Overhead: Once established, data frames have very little header overhead compared to HTTP requests.