Thursday, 19 September 2013

tornado use longpolling and how to know client alive

tornado use longpolling and how to know client alive

here is a global var queue={}
class Handler(object):
@tornado.web.asynchronous
def get(self):
queue['1']=self.response
def response(self):
self.finish('over')
def on_connection_close(self)
#if the stream is closed
return
if the client's network down or power off , the server still has the
stream and I how to know the stream is dead?

No comments:

Post a Comment