cURL / Mailing Lists / curl-users / Single Mail


Re: How to implement long-polling using curl-command-line?

From: Daniel Stenberg <>
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.

List admin:
Received on 2014-10-27