TsgcWSPServer_E2EE › Events › OnRawMessage
Fired with the raw WebSocket frame payload before subprotocol parsing.
property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object
—
Lets you inspect or intercept inbound traffic before the E2EE subprotocol parses it. Set Handled to True to suppress further processing by the component. Useful for logging or for applying custom filtering; the payload is encrypted ciphertext.
procedure TfrmServerE2EE.WSPE2EERawMessage(Connection: TsgcWSConnection;
const Text: string; var Handled: Boolean);
begin
MemoLog.Lines.Add('raw (' + IntToStr(Length(Text)) + ' bytes)');
Handled := False;
end;