TsgcWSPServer_WAMP › Events › OnMessage
Fires for incoming text frames from a client that the WAMP decoder did not route to a dedicated RPC or PubSub event.
property OnMessage: TsgcWSMessageEvent;
// TsgcWSMessageEvent = procedure(Connection: TsgcWSConnection; const Text: string) of object
—
Standard WAMP v1 frames (PREFIX, CALL, CALLCANCEL, SUBSCRIBE, UNSUBSCRIBE, PUBLISH) are consumed by the protocol decoder and raised through their dedicated events (OnCall, OnBeforeSubscription, OnPrefix…). Any other text frame — typically an application-specific extension or a message with an unknown type id — surfaces here. Silently ignoring the frame is safe; WAMP v1 has no contract obliging the server to acknowledge unrecognised messages.
procedure TForm1.WAMPServerMessage(Connection: TsgcWSConnection;
const Text: string);
begin
Memo1.Lines.Add(Format('[%s] passthrough: %s', [Connection.Guid, Text]));
end;