TsgcWSPServer_Files › Events › OnRawMessage
Fired before the subprotocol parses a text message, allowing custom handling.
property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object
—
Called with the raw text payload before the Files subprotocol decodes its envelope. Set Handled to True to consume the message and skip the default processing; leave it False to let the subprotocol handle it as usual.
procedure TForm1.oFilesRawMessage(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean);
begin
if Pos('ping', Text) = 1 then
Handled := True;
end;