libwolfram20

◆ WriteCallback()

static size_t WriteCallback ( void *  contents,
size_t  size,
size_t  nmemb,
void *  userp 
)
static

Function called by CUrl on DownloadURL.

More information on CUrl documentation.

Parameters
[in]contentsIt points to the delivered data
[in]sizeAlways 1
[in]nmembSize of the data
[out]userpUser data
Returns
Number of bytes actually taken care of
69 {
70 size_t realsize = size * nmemb;
71 ((std::string*)userp)->append((char*)contents, realsize);
72 return realsize;
73}