readBytes does not read bytes one by one but in chunks

This commit is contained in:
Benjamin Sergeant
2019-03-02 21:11:16 -08:00
parent a9e772f330
commit 0c226c7629
7 changed files with 49 additions and 49 deletions

View File

@ -231,7 +231,9 @@ namespace ix
payload.reserve(contentLength);
auto chunkResult = _socket->readBytes(contentLength, isCancellationRequested);
auto chunkResult = _socket->readBytes(contentLength,
args.onProgressCallback,
isCancellationRequested);
if (!chunkResult.first)
{
errorMsg = "Cannot read chunk";
@ -274,7 +276,9 @@ namespace ix
payload.reserve(payload.size() + chunkSize);
// Read a chunk
auto chunkResult = _socket->readBytes(chunkSize, isCancellationRequested);
auto chunkResult = _socket->readBytes(chunkSize,
args.onProgressCallback,
isCancellationRequested);
if (!chunkResult.first)
{
errorMsg = "Cannot read chunk";