TsgcWSPClient_WAMP › Events › OnEvent
Fires when a published event arrives on a topic this client has previously subscribed to.
property OnEvent: TsgcWSEvent;
// TsgcWSEvent = procedure(Connection: TsgcWSConnection; TopicURI, Event: string) of object
—
Delivered in response to a WAMP EVENT frame (type id 8), triggered when any session (including this one, unless the publisher used the excludeMe extension) calls Publish on a matching topic. TopicURI is the fully-resolved URI — prefixes are always expanded by the server before dispatch. Event carries the JSON payload exactly as supplied to Publish. Event delivery is at-most-once: if the transport drops before the frame is processed the event is lost.
procedure TForm1.WAMPEvent(Connection: TsgcWSConnection;
TopicURI, Event: string);
begin
Memo1.Lines.Add(Format('[%s] %s', [TopicURI, Event]));
end;