Browse Source

Info about active connections

Ondrej Pokorny 4 years ago
parent
commit
8fc1bc276f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-web/examples/httpserver/threadedhttpserver.pas

+ 3 - 1
packages/fcl-web/examples/httpserver/threadedhttpserver.pas

@@ -13,6 +13,8 @@ Type
   THTTPServer = class(TTestHTTPServer)
   THTTPServer = class(TTestHTTPServer)
   protected
   protected
     function CreateConnection(Data: TSocketStream): TFPHTTPConnection; override;
     function CreateConnection(Data: TSocketStream): TFPHTTPConnection; override;
+  public
+    Property ConnectionCount;
   end;
   end;
 
 
   TServerThread = class(TThread)
   TServerThread = class(TThread)
@@ -53,7 +55,7 @@ begin
   FServ.Threaded:=True;
   FServ.Threaded:=True;
   FServ.Port:=8080;
   FServ.Port:=8080;
   FServ.WriteInfo := @WriteInfo;
   FServ.WriteInfo := @WriteInfo;
-  FServ.AcceptIdleTimeout := 500;
+  FServ.AcceptIdleTimeout := 1000;
   FServ.OnAcceptIdle := @ServOnIdle;
   FServ.OnAcceptIdle := @ServOnIdle;
 end;
 end;