[Zope] Keep Alive Connection

Matt Ficken mattficken@mail.com
Sat, 17 May 2003 13:12:47 -0500


My product needs to send data to the client, and then later send the client more data, over the same connection. HTTP/1.1 created Keep-Alive connections for this reason. I tried setting the response header 'Connection' to 'Keep-Alive', but Zope closes the connection anyway.

So, I made an infinite loop in the function that is called when the connection is first opened, which keeps the connection open. Within the loop, the sleep function is called to sleep for 1 second, otherwise Zope sucks up all my unused CPU cycles.

But, after I get 2 or 3 of these loops going, the whole Zope server locks up. It won't accept any connections.

Is there a different way I can keep connections alive without locking up Zope or using all the system's CPU cycles?
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup