TsgcWSPClient_WAMP › Events › OnRawMessage
Fires before WAMP decoding, giving the application first look at every incoming text frame with an option to suppress further processing.
property OnRawMessage: TsgcWSRawMessageEvent;
// TsgcWSRawMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string; var Handled: Boolean) of object
—
Called before the JSON array is parsed into a WAMP message, so the payload is the verbatim frame text (for example [0,"session",1,"server"] for WELCOME). Set Handled := True to consume the frame completely — the component will then skip its own decoder and none of the specific events (OnWelcome, OnCallResult, OnEvent…) will fire. Leave Handled at False for ordinary logging or sniffing use cases. Useful for protocol capture tools, debugging and custom middleware that wants to handle non-standard frames.
procedure TForm1.WAMPRawMessage(Connection: TsgcWSConnection;
const Text: string; var Handled: Boolean);
begin
Memo1.Lines.Add('raw: ' + Text);
Handled := False;
end;