TsgcWSPServer_Presence › Events › OnRawMessage
Fired for every raw frame received before the Presence protocol parses it.
property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object
—
Gives you the unparsed text of every WebSocket text frame arriving on a Presence connection. Set Handled to True to stop the framework from parsing the frame as a Presence message (useful when you want to intercept and route non-Presence payloads yourself).
procedure TForm1.sgcWSPServer_Presence1RawMessage(Connection: TsgcWSConnection;
const Text: string; var Handled: Boolean);
begin
Log('<< ' + Text);
// Handled := True; // to skip default Presence parsing
end;