Closed leeyisoft closed 5 years ago
I would like to add a hanlder file to the existing restful API to implement a websocket server
I want to share a port with other restful API
The code is as follows. How do I access the websocket server?
urls = [ passport.IndexHandler, websocket.MsgServerHandler,
]
class MsgServerHandler(tornado.websocket.WebSocketHandler, CommonHandler): current_user_id = '' waiters = {} cache = [] cache_size = 200
Great...!!!
Could you please merge my last two submissions to master https://github.com/leeyisoft/tornado-rest
I would like to add a hanlder file to the existing restful API to implement a websocket server
I want to share a port with other restful API
The code is as follows. How do I access the websocket server?
urls = [ passport.IndexHandler, websocket.MsgServerHandler,
(r"/websocket", websocket.MsgServerHandler),
]
class MsgServerHandler(tornado.websocket.WebSocketHandler, CommonHandler): current_user_id = '' waiters = {} cache = [] cache_size = 200