comparison 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
comparison
equal deleted inserted replaced
5118:030cd210845e 5119:bdec57f3cbf2
59 HttpStatus status_; 59 HttpStatus status_;
60 bool hasContentLength_; 60 bool hasContentLength_;
61 uint64_t contentLength_; 61 uint64_t contentLength_;
62 uint64_t contentPosition_; 62 uint64_t contentPosition_;
63 bool keepAlive_; 63 bool keepAlive_;
64 unsigned int keepAliveTimeout_;
64 std::list<std::string> headers_; 65 std::list<std::string> headers_;
65 66
66 std::string multipartBoundary_; 67 std::string multipartBoundary_;
67 std::string multipartContentType_; 68 std::string multipartContentType_;
68 69
69 void StartStreamInternal(const std::string& contentType); 70 void StartStreamInternal(const std::string& contentType);
70 71
71 public: 72 public:
72 StateMachine(IHttpOutputStream& stream, 73 StateMachine(IHttpOutputStream& stream,
73 bool isKeepAlive); 74 bool isKeepAlive,
75 unsigned int keepAliveTimeout);
74 76
75 ~StateMachine(); 77 ~StateMachine();
76 78
77 void SetHttpStatus(HttpStatus status); 79 void SetHttpStatus(HttpStatus status);
78 80
124 126
125 HttpCompression GetPreferredCompression(size_t bodySize) const; 127 HttpCompression GetPreferredCompression(size_t bodySize) const;
126 128
127 public: 129 public:
128 HttpOutput(IHttpOutputStream& stream, 130 HttpOutput(IHttpOutputStream& stream,
129 bool isKeepAlive); 131 bool isKeepAlive,
132 unsigned int keepAliveTimeout);
130 133
131 void SetDeflateAllowed(bool allowed); 134 void SetDeflateAllowed(bool allowed);
132 135
133 bool IsDeflateAllowed() const; 136 bool IsDeflateAllowed() const;
134 137