SSE

SSE stands for Server-Sent Events.

SSE is a browser API that allows a server to push updates to the client over a single HTTP connection. Unlike WebSocket which is bidirectional, SSE only supports server-to-client messages.

SSE for WebRTC signaling

SSE can be used as a signaling transport for WebRTC:

  • Server-to-client: SSE delivers SDP answers and ICE candidates from the server
  • Client-to-server: Regular HTTP POST requests send SDP offers and ICE candidates to the server

SSE vs WebSocket for signaling

FeatureSSEWebSocket
DirectionServer-to-client onlyBidirectional
ProtocolHTTPWebSocket (upgraded HTTP)
ReconnectionAutomaticManual
Firewall friendlyYes (plain HTTP)Usually (port 443)
ComplexitySimplerMore features

SSE is a reasonable choice for WebRTC signaling when combined with HTTP POST for the client-to-server direction. It is simpler to implement than WebSocket and works well behind proxies. WHIP and WHEP use a similar HTTP-based approach.