Support for magic return codes in read and write functions
dwwoelfel opened this issue · 1 comments
dwwoelfel commented
libcurl supports returning CURL_READFUNC_PAUSE from the read function and CURL_WRITEFUNC_PAUSE from the write function.
If you return the magic value instead of the number of bytes that were read/written, then libcurl will try again with the same data after you unpause.
This would be very helpful to have for the read function especially. With the write function, users can usually handle a little bit of overflow after they call pause
. It's much more complicated with the read function. If you don't have the data available to write, then you'll have to return 0 and the transfer will end.