TsgcRTCPeerConnectionEvents › OnRTCWebSocketMessage

OnRTCWebSocketMessage Event

Fired when a raw signalling text message is received on the WebSocket.

Syntax

property OnRTCWebSocketMessage: TsgcRTCWebSocketMessageEvent;
// TsgcRTCWebSocketMessageEvent = procedure(Sender: TObject; Connection: TsgcWSConnection; const aText: string) of object

Default Value

Remarks

Raised for every raw text frame received on the signalling WebSocket — including the messages that carry SDP descriptions and ICE candidates through the RTCPeerConnection subprotocol. The component already decodes the well-known frames and exposes them through the SDP/candidate events; use OnRTCWebSocketMessage only when you need to inspect the raw signalling traffic for logging or debugging, or to handle application-specific messages sent over the same channel.

Example

procedure TForm1.oRTCWebSocketMessage(Sender: TObject;
  Connection: TsgcWSConnection; const aText: string);
begin
  Log('signalling << ' + aText);
end;

Back to Events