예제 #1
0
파일: server.py 프로젝트: stas/exorcyber
 def __init__(self):
     file_root = path.normpath(path.dirname(__file__))
     router = tornadio.get_router(ExorCyberConnection)
     application = tornado.web.Application(
         [(r"/", StaticHandler),router.route()],
         enabled_protocols = [
             'websocket',
             'flashsocket',
         #    'xhr-multipart',
             'xhr-polling'
         ],
         socket_io_port = 8081,
         flash_policy_file = path.join(file_root, 'static/flashpolicy.xml'),
     )
     tornadio.server.SocketServer(application)
예제 #2
0
파일: app.py 프로젝트: AaronO/notyfire
 def init_routes(self):
     router = tornadio.get_router(self.channel_server)
     self.routes = [router.route()]