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 19:28:28 +0800

Then how to get at least opened socket for handle by libcurl.............as
i have to send this port number to the server

On Thu, Oct 25, 2012 at 6:49 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 25 Oct 2012, JALINDAR wrote:
>
> I got to know how to open know socket number using CURLOPT_LOCALPORT but
>> how to wait on this socket?
>>
>
> libcurl opens its own sockets normally. CURLOPT_LOCALPORT is used to make
> libcurl bind the local end of the socket to a specific port.
>
> Use the multi / multi_socket API to wait for sockets in your application
> and use libcurl in a non-blocking fashion.
>
>
> my design intention is to sleep on this opened socket till i get any
>> communication request form server..
>>
>
> You'd use select(), curl_multi_wait() or an event based system with
> multi_socket for that purpose.
>
> We have examples showing all of those in use I believe.
>
> --
>
> / daniel.haxx.se
>
> ------------------------------**------------------------------**-------
> List admin: http://cool.haxx.se/list/**listinfo/curl-library<http://cool.haxx.se/list/listinfo/curl-library>
> Etiquette: http://curl.haxx.se/mail/**etiquette.html<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