TsgcWebSocketServer_HTTPAPI › Properties › Firewall
Assigns a firewall component that filters incoming connections by IP, region or custom rules.
public TsgcWSFirewall Firewall { get; set; }
nil
Drop a TsgcWebSocketFirewall component on the form (or create it at runtime) and assign it to Firewall to enable allow/deny rules for incoming connections based on IP address, CIDR range or a custom policy. When assigned, every new request is matched against the firewall rules before the WebSocket handshake is processed; rejected peers are dropped immediately. Leave unassigned to disable the firewall.
oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Firewall = oFirewall;
oServer.Active = true;