cURL / Mailing Lists / curl-library / Single Mail


Re: Sleep and wakeup on http request AND communication socket number

From: Dan Fandrich <>
Date: Tue, 23 Oct 2012 16:11:34 +0200

On Tue, Oct 23, 2012 at 08:55:50PM +0800, JALINDAR wrote:
> In my application I want to sleep() and want to wake up on the http connection
> request on already open socket using libcurl handle?

You can use the multi interface to get total control over when network
data is processed. Rather than using sleep, you'd use select or poll
with a timeout. Read up on the multi interface and take a look at some
of the sample programs to see how that works.

> Also want to get to know the reason of wake up time out or http connection
> request?

select and poll will say which socket is ready or whether it timed out

> how can one get the socket number opened by libcurl handle for communication?

The multi functions provide several ways of getting these for the
purposes of waiting on them.

>>> Dan
List admin:
Received on 2012-10-23