TsgcWSAPIKeyManagerMethods › UnregisterConnection

UnregisterConnection Method

Releases tracking for a connection. Called automatically on disconnect.

Syntax

procedure UnregisterConnection(const aIP: string);

Parameters

NameTypeDescription
aIPconst stringPeer IP of the connection that just closed.

Remarks

Counterpart to RegisterConnection — called automatically by the server on OnDisconnect so any per-connection state the key manager is holding (for custom subclasses that track live counts or rolling metrics) can be released. The stock implementation is a no-op placeholder. Under normal deployment with TsgcWebSocketHTTPServer.APIKeyManager assigned you never call it manually.

Example

// Called automatically by the server on disconnect. Custom loops:
sgcWSAPIKeyManager1.UnregisterConnection(oPeer.IP);

Back to Methods