Files
itgmania212121/extern/IXWebSocket-11.3.2/ixwebsocket/IXProgressCallback.h
T
Martin Natanoandteejusb 394bc93915 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
2022-03-12 14:18:48 -08:00

17 lines
343 B
C++

/*
* IXProgressCallback.h
* Author: Benjamin Sergeant
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
*/
#pragma once
#include <functional>
#include <string>
namespace ix
{
using OnProgressCallback = std::function<bool(int current, int total)>;
using OnChunkCallback = std::function<void(const std::string&)>;
}