TsgcWSPServer_Presence › Events › OnDisconnect
Fired when a client disconnects from the Presence protocol.
property OnDisconnect: TsgcWSDisconnectEvent;
// TsgcWSDisconnectEvent = procedure(Connection: TsgcWSConnection; Code: Integer) of object
—
Called on the server once a client connection is closed. Code carries the WebSocket close code. Note that member cleanup and channel unsubscription are signalled separately through OnRemoveMember and OnRemoveChannelMember.
procedure TForm1.sgcWSPServer_Presence1Disconnect(Connection: TsgcWSConnection;
Code: Integer);
begin
Log('Presence client disconnected: ' + Connection.Guid + ' code=' + IntToStr(Code));
end;