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)
def init_routes(self): router = tornadio.get_router(self.channel_server) self.routes = [router.route()]