Jump to content

problems with comet connection

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
t3tris

t3tris

    Newbie

  • Members
  • Pip
  • 5 posts
I'm trying to get a real time chat going with a comet connection. I've done this successfully with the "long polling" technique. The problem that I'm running into here is that post requests to the server greatly decrease in speed if there is a long interval in between data sent via posts. Having a one and one half second delay after every send isn't exactly what I'm after. I solved this problem by sending an empty XHR post request about once every five seconds, and the script works fine, and in real time. This seems like a waste of resources though, and for the sake of knowledge I would like to know why this is necessary. I believe it has something to do with the keep alive time on the server? I don't want to change this timeout setting for all requests though, as it would be a waste of server resources. I'm essentially wondering if there is a way to keep this connection fluid, without wasting a lot of resources. The server listen loop is in php.

#2
joyo

joyo

    Newbie

  • Members
  • PipPip
  • 17 posts
In my idea, I think it is hard to solve you problem by IE browser which is used to visit your server program.

because there are a lot of limit and standard in web server or IE browser.
If you want to solve it , you'd better to develop an application by c programming or other language instead of php.