curl-library
RE: Libcurl comet connection
Date: Thu, 3 Dec 2015 13:51:18 -0500
> -----Original Message-----
> From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Daniel Stenberg
> Sent: Tuesday, November 24, 2015 4:32 PM
> To: libcurl development
> Subject: RE: Libcurl comet connection
>
> On Tue, 24 Nov 2015, john wrote:
>
> > I want to establish a connection to the host with a HTTP post. This
> > connection needs to stay open.
>
> libcurl won't close it without reason so you just have to make sure your
> server holds it open. A typical way to accomplish that is to respond with a
> chunked response and let each new "message" from the server be another
> chunk.
> And you can implement a "keep-alive" chunk to prevent the connection to
> have to be completely idle for a very long time (as NATs and firewalls will
> then close it).
>
[John] Continuing my POC effort using curl_multi_socket_action.
After the 1st chunked response is processed, the sock callback routine posts
me with a 'REMOVE' action and subsequent curl_multi_socket_action (CURL_SOCKET_TIMEOUT) gives me
still_running = 0. The connection is still open, but libcurl does not accept anymore data.
Exactly what does 'REMOVE' mean?
How can I get the curl socket to accept more input?
>
> / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-12-03