arief nur andono
unread,Mar 2, 2011, 3:36:19 AM3/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tornado Web Server
in any example code (chat)...tornado give response to all users
connected.
how to make tornado could response on certain user
class MessageUpdatesHandler(BaseHandler, MessageMixin):
@tornado.web.authenticated
@tornado.web.asynchronous
def post(self):
cursor = self.get_argument("cursor", None)
self.wait_for_messages(self.async_callback(self.on_new_messages),
cursor=cursor)
def on_new_messages(self, messages):
# Closed client connection
if self.request.connection.stream.closed():
return
self.finish(dict(messages=messages))
which code should I change so it could reply on certain user?