cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: blocking IO through curl_easy_perform()

From: amit paliwal <amit.ambitions_at_gmail.com>
Date: Thu, 30 Dec 2010 17:34:03 -0500

On Thu, Dec 30, 2010 at 5:25 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 30 Dec 2010, amit paliwal wrote:
>
> Which API supports blocking operation with libcurl. I need to get blocked
>> until Server sends some data, and once it sends data then only do
>> curl_easy_perform() to fetch that data.
>>
>
> curl_easy_perform() is a blocking operation. It will return when the
> response has been received. As documented.
>

Reply: Yes, my initial set of operation is happening properly now, but as
you might remember we had a discussion on server-sent events, so after
initial set, I will be receiving SSE from Server and I need to fetch it from
socket. If I do second curl_easy_perform() immediately after the first, it
does not give time to Server to send SSE, so in principal I need to wait
until server sends SSE.

How will I come to know that server has sent data???

>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-30