TsgcWSAPIKeyManagerMethods › RegisterConnection

RegisterConnection Method

Tracks a new connection. Called automatically by the server.

Syntax

procedure RegisterConnection(const aIP: string);

Parameters

NameTypeDescription
aIPconst stringPeer IP of the newly accepted connection.

Remarks

Bookkeeping hook invoked automatically by the server after IsConnectionAllowed returns True — it is the symmetric counterpart of UnregisterConnection. The stock implementation is a no-op placeholder; override in a subclass if you want to track live connection counts per IP or enrich audit entries with session-level context. Safe to call manually from custom server code, but under normal use you should never need to.

Example

// Called automatically by TsgcWebSocketHTTPServer. Custom loops:
sgcWSAPIKeyManager1.RegisterConnection(oPeer.IP);

Back to Methods