cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: JALINDAR <jalindergat_at_gmail.com>
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 <dan_at_coneharvesters.com>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: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
*Best Regards
Jalindar
Taipei,Taiwan.
Phone: +8860970698242
*

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-25