cURL / Mailing Lists / curl-library / Single Mail


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

Date: Thu, 25 Oct 2012 18:31:29 +0800

Sorry but i think this dont answer much!!

I got to know how to open know socket number using CURLOPT_LOCALPORT but
how to wait on this socket?

my design intention is to sleep on this opened socket till i get any
communication request form server..

On Tue, Oct 23, 2012 at 10:11 PM, Dan Fandrich <>wrote:

> 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
> waiting.
> > 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:
> Etiquette:

*Best Regards
Phone: +8860970698242

List admin:
Received on 2012-10-25