diff options
Diffstat (limited to 'http-server/response.cc')
-rw-r--r-- | http-server/response.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/http-server/response.cc b/http-server/response.cc index b322cad8..779ecedc 100644 --- a/http-server/response.cc +++ b/http-server/response.cc @@ -16,10 +16,15 @@ #include "common.h" #include "response.h" +#define DEFAULT_LIFETIME 1024 * 1024 + namespace icn_httpserver { Response::Response() - : std::ostream(&streambuf_), is_last_(false) { + : std::ostream(&streambuf_), + is_last_(false), + response_length_(0), + response_lifetime_(DEFAULT_LIFETIME) { } Response::~Response() { @@ -37,6 +42,13 @@ void Response::setIsLast(bool is_last) { Response::is_last_ = is_last; } +const std::chrono::milliseconds &Response::getResponseLifetime() const { + return response_lifetime_; +} +void Response::setResponseLifetime(const std::chrono::milliseconds &response_lifetime) { + Response::response_lifetime_ = response_lifetime_; +} + void Response::setResponseLength(std::size_t length) { response_length_ = length; } |