TsgcWSPServer_WebRTC › Events › OnRawMessage
Fires before signalling decoding, letting the server inspect every incoming text frame and optionally suppress further processing.
property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object
—
Called before the JSON envelope is parsed into a signalling message, so Text is the verbatim frame — for example {"method":"sgc@webrtc","webrtc":{"type":"offer","sdp":"…"}}. Set Handled := True to consume the frame completely: the component will skip its own decoder and none of the dedicated events (OnBeforeSubscription, OnSubscription…) will fire for that message, and the SDP/ICE relay will not run. Leave Handled := False to use the event purely for logging or capture while letting the signalling layer proceed normally.
procedure TForm1.WebRTCServerRawMessage(Connection: TsgcWSConnection;
const Text: string; var Handled: Boolean);
begin
Memo1.Lines.Add(Format('[%s] raw: %s', [Connection.Guid, Text]));
Handled := False;
end;