diff OrthancFramework/Sources/HttpServer/HttpOutput.h @ 5119:bdec57f3cbf2

New configuration KeepAliveTimeout with a default value of 1 second
author Alain Mazy <am@osimis.io>
date Wed, 14 Dec 2022 11:50:43 +0100
parents 43e613a7756b
children 0ea402b4d901
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpOutput.h	Fri Dec 09 12:42:17 2022 +0100
+++ b/OrthancFramework/Sources/HttpServer/HttpOutput.h	Wed Dec 14 11:50:43 2022 +0100
@@ -61,6 +61,7 @@
       uint64_t contentLength_;
       uint64_t contentPosition_;
       bool keepAlive_;
+      unsigned int keepAliveTimeout_;
       std::list<std::string> headers_;
 
       std::string multipartBoundary_;
@@ -70,7 +71,8 @@
 
     public:
       StateMachine(IHttpOutputStream& stream,
-                   bool isKeepAlive);
+                   bool isKeepAlive,
+                   unsigned int keepAliveTimeout);
 
       ~StateMachine();
 
@@ -126,7 +128,8 @@
 
   public:
     HttpOutput(IHttpOutputStream& stream,
-               bool isKeepAlive);
+               bool isKeepAlive,
+               unsigned int keepAliveTimeout);
 
     void SetDeflateAllowed(bool allowed);