By default, if you only fill Port property, the server binds the listening port on ALL IPs, so if for example you have 3 IPs: 127.0.0.1, 80.54.11.22 and 12.55.41.17, your server will bind this port on all 3 IPs.
It is usually recommended to bind only to the needed IPs. This is where you can use the Bindings property.
Instead of using the Port property, just use the Bindings property and fill in the required IP and Port.
Example: bind Port 5555 to IP 127.0.0.1 and IP 80.58.25.40
oServer := TsgcWebSocketServer.Create(nil);
With oServer.Bindings.Add do
begin
IP := '127.0.0.1';
Port := 5555;
end;
With oServer.Bindings.Add do
begin
IP := '80.58.25.40';
Port := 5555;
end;
oServer.Active := true;
If you change the Port after closing a server, to start listening on a different port, call the method Bindings.Clear() after closing the server to delete all previous bindings. Otherwise the server will try to bind to the previous bindings.