TsgcWSPServer_Files › Events › OnSubscription

OnSubscription Event

Fired after a client has been successfully subscribed to a channel.

Syntax

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

Default Value

—

Remarks

Fires after OnBeforeSubscription has accepted the request and the client is now registered on the channel. Use this event to seed the client with current state (for example, a snapshot broadcast).

Example

procedure TForm1.oFilesSubscription(Connection: TsgcWSConnection; const Subscription: String);
begin
  Memo1.Lines.Add(Format('%s subscribed to %s', [Connection.Guid, Subscription]));
end;

Back to Events