Pass "last" bool to res->onData

This commit is contained in:
Alex Hultman
2019-01-07 03:05:19 +01:00
parent 4fde553d03
commit 47467ab1e5
4 changed files with 12 additions and 13 deletions
+2 -3
View File
@@ -243,9 +243,8 @@ public:
return this;
}
// onData(chunk, remaining == -1 or 0 or actual remaining)?
/* Attach a read handler for data sent. Will be called with a chunk of size 0 when FIN */
void read(std::function<void(std::string_view)> handler) {
/* Attach a read handler for data sent. Will be called with FIN set true if last segment. */
void onData(std::function<void(std::string_view, bool)> handler) {
HttpResponseData<SSL> *data = getHttpResponseData();
data->inStream = handler;
}