TsgcWSPServer_PresenceEvents › OnRemoveChannelMember

OnRemoveChannelMember Event

Fired when a member leaves a channel, whether by unsubscribing or disconnecting.

Syntax

property OnRemoveChannelMember: TsgcWSPresenceRemoveMemberChannelEvent;
// TsgcWSPresenceRemoveMemberChannelEvent = procedure(Connection: TsgcWSConnection; const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember) of object

Default Value

Remarks

Called whenever a member is removed from a channel: this includes explicit unsubscribe requests from the client and automatic cleanup triggered by a disconnect. All remaining channel subscribers are notified so they can update their local rosters.

Example

procedure TForm1.sgcWSPServer_Presence1RemoveChannelMember(Connection: TsgcWSConnection;
  const aChannel: TsgcWSPresenceChannel; const aMember: TsgcWSPresenceMember);
begin
  Log('Member ' + aMember.Name + ' left channel ' + aChannel.Name);
end;

Back to Events