示例#1
0
    def start(cls, ui, title, debug=False, port=9999):
        if debug:
            logging.basicConfig(level=logging.DEBUG)
        log.debug()

        app = cls.tornado_app(ui, title, debug=debug)
        app.listen(port)

        IOLoop.instance().start()
示例#2
0
    def start(cls, ui, title, debug=False, port=9999):
        if debug:
            logging.basicConfig(level=logging.DEBUG)
        log.debug()

        app = cls.tornado_app(ui, title, debug=debug)
        app.listen(port)

        IOLoop.instance().start()
示例#3
0
 def on_close(self):
     log.debug()
示例#4
0
 def on_message(self, msg):
     msg = json.loads(msg)
     log.debug(msg)
示例#5
0
 def on_open(self, info):
     log.debug()
     self.send_json('ready')
示例#6
0
 def send_json(self, kind, data=None):
     log.debug()
     self.send(json.dumps({'kind': kind, 'data': data or {}}))
示例#7
0
 def on_close(self):
     log.debug()
示例#8
0
 def on_message(self, msg):
     msg = json.loads(msg)
     log.debug(msg)
示例#9
0
 def on_open(self, info):
     log.debug()
     self.send_json('ready')
示例#10
0
 def send_json(self, kind, data=None):
     log.debug()
     self.send(json.dumps({'kind': kind, 'data': data or {}}))