Question

How can I create Wget/curl request to comet server

I have a php based server and embeded linux machine I have to create listener from client side but not based on browser and it must not use sockets.

Was it helpful?

Solution

I think you are referring to that one facet of Comet where a server-client connection remains open on an unfinished http request for a long(ish) period of time. I honestly don't think that it would be wise to do that with simple scripting of wget or curl, however it's completely possible to use libcURL (the library that cURL is built around) for such a purpose. Daniel Stenberg, author of cURL and libcURL himself said so:

AFAIK, COMET is just HTTP done in a slightly funny way but still plain HTTP and libcurl should be able to do it fine. Even if COMET also is a what wikipedia calls an "umbrella term" which seems to include a lot of different approaches.

Just one thing (re the socket remark): do realize that "below" whatever solution you'll choose there will be a socket transporting the data, because that's how http gets over the wire.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top