TsgcWSPServer_E2EEEvents › OnRawMessage

OnRawMessage Event

Fired with the raw WebSocket frame payload before subprotocol parsing.

Syntax

property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object

Default Value

Remarks

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.

Example

procedure TfrmServerE2EE.WSPE2EERawMessage(Connection: TsgcWSConnection;
  const Text: string; var Handled: Boolean);
begin
  MemoLog.Lines.Add('raw (' + IntToStr(Length(Text)) + ' bytes)');
  Handled := False;
end;

Back to Events