curl-users
Re: How to implement long-polling using curl-command-line?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 27 Oct 2014 13:34:21 +0100 (CET)
Date: Mon, 27 Oct 2014 13:34:21 +0100 (CET)
On Mon, 27 Oct 2014, AC Pan wrote:
> 1. Can curl connect to a php server and have the connection stay with the
> server until data arrive? How to do it ? i tested Curl.exe, the connection
> does not stay. May be i am not aware of syntax used.
curl will do it by default, nothing extra needed. "long-polling" is just
another word for saying "very very very slow server" and that's of course
something curl supports. Just make sure the server keeps the connection alive.
And you probably want to enable TCP keep-alive for the cases you go through
NATs or firewalls etc.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2014-10-27