API Buffered Write

.. when sending metrics, since if no selection is made
   it can result in thousands of needless updates !
This commit is contained in:
Mark Liversedge
2015-09-08 11:48:46 +01:00
parent c19b57ee98
commit 6eaa3c90af
4 changed files with 44 additions and 17 deletions

View File

@@ -85,6 +85,11 @@ public:
*/
void write(QByteArray data, bool lastPart=false);
// buffered write
void setBuffersize(int size) { buffersize=size; barry.reserve(size); }
void bwrite(QByteArray data);
void flush();
/**
Indicates wheter the body has been sent completely. Used by the connection
handler to terminate the body automatically when necessary.
@@ -136,6 +141,8 @@ private:
*/
void writeHeaders();
int buffersize;
QByteArray barry;
};
#endif // HTTPRESPONSE_H