#include <icy/http/connection.h>Inherits:
Signal< void(const double &)>
HTTP progress signal for upload and download progress notifications.
Emits a double in the range [0, 100] as data is transferred. Set total to the expected byte count before calling [update()](#update-5).
| Return | Name | Description |
|---|---|---|
void * | sender | Optional context pointer identifying the sender. |
uint64_t | current | Bytes transferred so far. |
uint64_t | total | Total expected bytes (from Content-Length). |
void * senderOptional context pointer identifying the sender.
uint64_t currentBytes transferred so far.
uint64_t totalTotal expected bytes (from Content-Length).
| Return | Name | Description |
|---|---|---|
ProgressSignal inline | ||
double | progress const inline | Returns the current transfer progress as a percentage (0-100). |
void | update inline | Advances the progress counter by nread bytes and emits the updated percentage. |
inline
inline ProgressSignal()const inline
inline double progress() constReturns the current transfer progress as a percentage (0-100).
inline
inline void update(int nread)Advances the progress counter by nread bytes and emits the updated percentage.
nread Number of bytes just transferred.std::runtime_error if current would exceed total.