Browse Source

* Obey -p/--port command-line option

Michaël Van Canneyt 2 years ago
parent
commit
ef4a1c74cb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-web/examples/websocket/server/wsserver.lpr

+ 1 - 1
packages/fcl-web/examples/websocket/server/wsserver.lpr

@@ -96,7 +96,7 @@ begin
     FSrv.MessageWaitTime:=StrToIntDef(GetOptionValue('w','wait'),DefaultWaitTime);
   if HasOption('i','idle') then
     FSrv.AcceptIdleTimeout:=StrToIntDef(GetOptionValue('i','idle'),DefaultAcceptTimeout);
-  FSrv.Port:=6060;
+  FSrv.Port:=StrToIntDef(GetOptionValue('p','port'),6060);
   FSrv.Active:=True;
   FSrv.OutgoingFrameMask:=StrToIntDef(GetOptionValue('m','mask'),0);
   if Not FSrv.ThreadedAccept then