Follow

Maybe it's just me, but libcurl's callback-oriented interface seems kinda whack. It's like "aaaaah! here's some data! you deal with it!"...but this is over TCP. I should be able to say "2048 bytes please, libcurl" and libcurl should reply "2048 bytes for you, sir", and so on, with the server waiting in between my requests until there are no more bytes to read..

So, apparently you can tell libcurl to wait a bit by returning CURL_WRITEFUNC_PAUSE from your callback...still a bit weird, but I guess it works.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.