AUI Framework
develop
Cross-platform base for C++ UI apps
|
Easy curl instance. More...
#include <AUI/Curl/ACurl.h>
ACurl::Builder is used to construct ACurl.
Analogous to Qt's QNetworkRequest.
using ACurl::ReadCallback = std::function<std::size_t(char* dst, size_t maxLen)> |
dst | destination buffer you should write to. |
maxLen | destination buffer size aka max length. |
Unlike regular streams, blocking is not allowed. To indicate the data unavailability, return zero. To indicate end of file, throw an AEOFException.
using ACurl::WriteCallback = std::function<size_t(AByteBufferView data)> |
data | received data |
Unlike regular streams, blocking is not allowed. To indicate buffer overflow, return zero. To indicate end of file, throw an AEOFException.
using ACurl::WriteCallbackV2 = std::function<size_t(ACurl& curl, AByteBufferView data)> |
curl | curl instance |
data | received data |
Unlike regular streams, blocking is not allowed. To indicate buffer overflow, return zero. To indicate end of file, throw an AEOFException.
> All members, including inherited
|
virtual |
curl does not have a function which immediately stops the transfer (see https://curl.se/docs/faq.html#How_do_I_stop_an_ongoing_transfe). The stop functionality is handled in ACurl by returning error code on all callbacks. close() function is non-blocking, and some time would be taken until the run() method finally returns.
After calling close() method, none of the result signals (like fail, success) will be called.
close() is non-blocking function.
close() is thread-safe.
Reimplemented in AWebsocket.
emits<ErrorDescription> ACurl::fail |
getResponseCode()
function. emits ACurl::success |
getResponseCode()
function. Contents