2

can anyone show me and example of how to handle a generic socket.io connection (depends on the client browser, could be websockets, or xhr-longpolling, etc..) using gevent and flask, or maybe flask with tornado as an async server thank you

Redouane Zait
  • 175
  • 3
  • 8
  • 1
    Did your have a look at [this](http://stackoverflow.com/questions/4762086/socket-io-client-library-in-python) answer? – RickyA Sep 23 '11 at 21:56
  • What have you tried and where is it not working? Alternately, what have you looked into and what are you confused about that is making it difficult to choose? – Sean Vieira Sep 24 '11 at 02:45

1 Answers1

3

TornadIO works well enough with stable version of socket.io (0.6), it integrates into any Tornado-powered application as a common request handler, wrapped around class with socket events callbacks. Works pretty stable.

But I'd recommend not to use the provided SocketServer class and just configure correctly the common HTTPServer of Tornado, just take a look at SocketServer implementation as a guideline.

Ivan Blinkov
  • 2,466
  • 15
  • 17