TsgcWebSocketFirewall › Methods › UnregisterConnection
Decrements the per-IP connection counter when a previously registered connection closes, freeing capacity for RateLimit.
procedure UnregisterConnection(const aIP: string);
| Name | Type | Description |
|---|---|---|
aIP | const string | IPv4 or IPv6 address of the client whose connection has been closed. |
UnregisterConnection is the counterpart to RegisterConnection and is invoked automatically by the server integration on disconnect. Each call decrements the active-connection count for the IP; the firewall never drops below zero, so extra calls are harmless. For custom transports, call it from your disconnect path exactly once per RegisterConnection to keep RateLimit counters accurate.
procedure TMyTransport.OnClose(const aIP: string);
begin
sgcWebSocketFirewall1.UnregisterConnection(aIP);
end;