import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
 
 
class WSHandler(tornado.websocket.WebSocketHandler):
    def open(self):
        print 'new connection'
        self.write_message("Hello World")
      
    def on_message(self, message):
        print 'message received %s' % message
 
    def on_close(self):
      print 'connection closed'
 
 
application = tornado.web.Application([
    (r'/ws', WSHandler),
])
 
 
if __name__ == "__main__":
    http_server = tornado.httpserver.HTTPServer(application)
    http_server.listen(8080)
    tornado.ioloop.IOLoop.instance().start()


No permission to view Main.UserList

Register








Web Description Links
TWiki documentation, welcome guest and user registration
Search Changes Notification Statistics Preferences
Sandbox web to experiment in an open hands-on area
Search Changes Notification Statistics Preferences
TIP Webs are color-coded for identification and reference. Contact dicedh2@gmail.com if you need a workspace web for your team.

Legend: Search topic Search the web Statistics Usage statistics of the web
Recent changes See recent changes in the web Wrench, tools Web-specific preferences
Notify Subscribe to get notified of changes by e-mail  


Edit | Attach | Watch | Print version | History: r75 | r35 < r34 < r33 < r32 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r33 - 2015-01-12 - TWikiAdminUser
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback