TsgcWebSocketServer › Properties › Port
TCP port on which the server accepts incoming WebSocket and HTTP connections.
property Port: Integer read GetPort write _SetPort;
80
Set Port before activating the server. Any value between 1 and 65535 is accepted, but ports below 1024 normally require elevated privileges on Unix and firewall rules on Windows. When the server listens on several endpoints use Bindings instead; assigning Port is equivalent to a single binding on 0.0.0.0. If you change Port after stopping the server, call Bindings.Clear() first so the previous handle is released.
oServer := TsgcWebSocketServer.Create(nil);
oServer.Port := 8080;
oServer.Active := true;