Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/BufferHttpSender.h @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | 7112a8af0b63 |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
34 size_t currentChunkSize_; | 34 size_t currentChunkSize_; |
35 | 35 |
36 public: | 36 public: |
37 BufferHttpSender(); | 37 BufferHttpSender(); |
38 | 38 |
39 std::string& GetBuffer() | 39 std::string& GetBuffer(); |
40 { | |
41 return buffer_; | |
42 } | |
43 | 40 |
44 const std::string& GetBuffer() const | 41 const std::string& GetBuffer() const; |
45 { | |
46 return buffer_; | |
47 } | |
48 | 42 |
49 // This is for test purpose. If "chunkSize" is set to "0" (the | 43 // This is for test purpose. If "chunkSize" is set to "0" (the |
50 // default), the entire buffer is consumed at once. | 44 // default), the entire buffer is consumed at once. |
51 void SetChunkSize(size_t chunkSize) | 45 void SetChunkSize(size_t chunkSize); |
52 { | |
53 chunkSize_ = chunkSize; | |
54 } | |
55 | 46 |
56 | 47 |
57 /** | 48 /** |
58 * Implementation of the IHttpStreamAnswer interface. | 49 * Implementation of the IHttpStreamAnswer interface. |
59 **/ | 50 **/ |
60 | 51 |
61 virtual uint64_t GetContentLength() ORTHANC_OVERRIDE | 52 virtual uint64_t GetContentLength() ORTHANC_OVERRIDE; |
62 { | |
63 return buffer_.size(); | |
64 } | |
65 | 53 |
66 virtual bool ReadNextChunk() ORTHANC_OVERRIDE; | 54 virtual bool ReadNextChunk() ORTHANC_OVERRIDE; |
67 | 55 |
68 virtual const char* GetChunkContent() ORTHANC_OVERRIDE; | 56 virtual const char* GetChunkContent() ORTHANC_OVERRIDE; |
69 | 57 |