Closed quard8 closed 11 years ago
Here are my suggestions:
@tornado.gen.engine
and @tornado.web.asynchronous
decorators, it should be as simple and fast as possible. Set IOLoop callback (http://www.tornadoweb.org/en/stable/ioloop.html?highlight=ioloop#tornado.ioloop.IOLoop.add_callback) to run an asynchronous code on receiving a message.sockjs.tornado.SockJSConnection
class instead of the tornado.websocket.WebSocketHandler
class.Thanks for quick answer! I will try to use global Client.
WebSocket's are great, but for iOS application it still painfull to check connections on app close.
Thanks, anyway!
Oh, I didn't mentioned in my previous answer that you may use long-polling connections with sockjs.
Please check the documentation and client source code here: https://github.com/sockjs/sockjs-client#sockjs-client-api. May be it would me easier to implement sockjs connection protocol in your iOS application and get the websocket connection support (to be used by Android or web applications) "for free"?
However, it's only a suggestion. Thank you.
I'm trying to implement simple long-polling chat and have strange situation. When adding new message, message id will be pushed to channel. On updates handler I subscribing to that channel. But I can't execute any commands, because I got exception
I'm doing like this:
So you can see that I'm unsubscribing and still get error. What I'm missing?