sendSignal method

void sendSignal({
  1. required String fromEndpointId,
  2. required String toEndpointId,
  3. required Object? payload,
})

Sends an opaque payload to one named endpoint, through the hub.

The hub forwards it verbatim without looking inside, so what goes in payload is entirely between the two peers — a WebRTC offer, an answer, an ICE candidate. It must be JSON-encodable.

Implementation

void sendSignal({
  required String fromEndpointId,
  required String toEndpointId,
  required Object? payload,
}) => _send(
  WsFrame(WsControl.signal, {
    'from': fromEndpointId,
    'to': toEndpointId,
    'payload': payload,
  }).encode(),
);