TsgcWSPClient_FilesEvents › OnSubscription

OnSubscription Event

Fires when the server confirms a channel subscription requested with Subscribe.

Syntax

property OnSubscription: TsgcWSSubscriptionEvent;
// TsgcWSSubscriptionEvent = procedure(Connection: TsgcWSConnection; const Subscription: String) of object

Default Value

Remarks

Subscription carries the channel name this client has successfully joined. Use the event to track registered channels or trigger follow-up actions once the server acknowledges the subscription.

Example

procedure TForm1.oProtocolSubscription(Connection: TsgcWSConnection;
  const Subscription: String);
begin
  Memo1.Lines.Add('subscribed: ' + Subscription);
end;

Back to Events