How to simulate slow connection
Hi there!
I'm trying to write a simple C program which will POST some binary data to remote http server using libcurl. The problem is that I want this binary data be generated in real time.
Here is the actual way to post binary data using libcurl:
curl_easy_setopt(easyhandle, CURLOPT_POSTFIELDS, binary_pointer);
If I'll pass some function which will generate binary data as "binary pointer" argument to curl_easy_setopt(); It will just wait while my function finishes generating data and then send it.
The question is how can I perform a POST http request in conveyor way
e.g. One byte generated -> one byte send?
Using Debian Squeeze(linux kernel) and HTTP/1.0 protocol
|