curl/Easy: add SetReadFunction()
This commit is contained in:
parent
409002b1c3
commit
3db584a3ea
@ -119,6 +119,10 @@ public:
|
||||
SetOption(CURLOPT_USERPWD, userpwd);
|
||||
}
|
||||
|
||||
void SetUpload(bool value=true) {
|
||||
SetOption(CURLOPT_UPLOAD, (long)value);
|
||||
}
|
||||
|
||||
void SetNoProgress(bool value=true) {
|
||||
SetOption(CURLOPT_NOPROGRESS, (long)value);
|
||||
}
|
||||
@ -154,6 +158,13 @@ public:
|
||||
SetOption(CURLOPT_WRITEDATA, userdata);
|
||||
}
|
||||
|
||||
void SetReadFunction(size_t (*function)(char *ptr, size_t size,
|
||||
size_t nmemb, void *userdata),
|
||||
void *userdata) {
|
||||
SetOption(CURLOPT_READFUNCTION, function);
|
||||
SetOption(CURLOPT_READDATA, userdata);
|
||||
}
|
||||
|
||||
void SetNoBody(bool value=true) {
|
||||
SetOption(CURLOPT_NOBODY, (long)value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user