curl-users
Re: How to implement long-polling using curl-command-line?
Date: Tue, 28 Oct 2014 02:51:33 +0800
Hi Daniel,
Many thanks for your quick response.
I think you are absolutely right, TCP keep-alive is a good pointer from
you, I will find some time to test again.
Cheers
AC Pan
On Mon, Oct 27, 2014 at 8:34 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> 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.html
Received on 2014-10-27