TsgcWSPClient_sgc › Events › OnEvent
Fires when a message is received on a subscribed channel.
property OnEvent: TsgcWSCustomEvent;
// TsgcWSCustomEvent = procedure(Connection: TsgcWSConnection; const Channel, Text: string) of object
—
Delivers Publish notifications from other clients (or from the server) for channels the client has subscribed to. Channel holds the channel name and Text the payload exactly as it was published.
procedure TForm1.oProtocolEvent(Connection: TsgcWSConnection; const Channel, Text: string);
begin
Memo1.Lines.Add(Format('[%s] %s', [Channel, Text]));
end;