comparison Core/HttpServer/HttpOutput.h @ 1115:da56a7916e8a

Experimental "KeepAlive" configuration option to enable HTTP Keep-Alive
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Sep 2014 17:30:13 +0200
parents ba5c0908600c
children d9c27f9f1a51
comparison
equal deleted inserted replaced
1114:adfd2c7a92f3 1115:da56a7916e8a
61 61
62 HttpStatus status_; 62 HttpStatus status_;
63 bool hasContentLength_; 63 bool hasContentLength_;
64 uint64_t contentLength_; 64 uint64_t contentLength_;
65 uint64_t contentPosition_; 65 uint64_t contentPosition_;
66 bool keepAlive_;
66 std::list<std::string> headers_; 67 std::list<std::string> headers_;
67 68
68 public: 69 public:
69 StateMachine(IHttpOutputStream& stream); 70 StateMachine(IHttpOutputStream& stream,
71 bool isKeepAlive);
70 72
71 ~StateMachine(); 73 ~StateMachine();
72 74
73 void SetHttpStatus(HttpStatus status); 75 void SetHttpStatus(HttpStatus status);
74 76
90 }; 92 };
91 93
92 StateMachine stateMachine_; 94 StateMachine stateMachine_;
93 95
94 public: 96 public:
95 HttpOutput(IHttpOutputStream& stream) : stateMachine_(stream) 97 HttpOutput(IHttpOutputStream& stream,
98 bool isKeepAlive) :
99 stateMachine_(stream, isKeepAlive)
96 { 100 {
97 } 101 }
98 102
99 void SendStatus(HttpStatus status); 103 void SendStatus(HttpStatus status);
100 104