Add support for streaming transfers

This change adds onChunkCallback to the request. If defined it will be
called repeatedly with the incoming data. This allows to process data on
the go or write it to disk instead of accumulating the data in memory.

Submitted upstream:
https://github.com/machinezone/IXWebSocket/pull/353
This commit is contained in:
Martin Natano
2022-03-12 14:18:48 -08:00
committed by teejusb
parent bb8fc0f4c2
commit 394bc93915
8 changed files with 120 additions and 17 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ namespace ix
false, "Error: 'Content-Length' should be a positive integer", httpRequest);
}
auto res = socket->readBytes(contentLength, nullptr, isCancellationRequested);
auto res = socket->readBytes(contentLength, nullptr, nullptr, isCancellationRequested);
if (!res.first)
{
return std::make_tuple(