Пример #1
0
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     self._current_user = None
     self.middleware_manager = MiddlewareManager(self)
     self.db = Mongo.db.ui  #@UndefinedVariable
     #run all middleware request hooks
     self.middleware_manager.run_request_hooks()
Пример #2
0
 def __init__(self, *args, **kw):
     print 'Presence handler created'
     WebSocketHandler.__init__(self, *args, **kw)
     self._user = None
     self._closed = False
     IOLoop.instance().add_timeout(time.time() + 5,
                                   self._check_notifications)
Пример #3
0
	def __init__(self, application, request):
		WebSocketHandler.__init__(self, application, request)
		self._current_user = None
		self.middleware_manager = MiddlewareManager(self)
		self.db = Mongo.db.ui #@UndefinedVariable
		#run all middleware request hooks
		self.middleware_manager.run_request_hooks()
Пример #4
0
 def __init__(self, *args, **kwds):
 #---------------------------------
   WebSocketHandler.__init__(self, *args, **kwds)  ## Can't use super() as class is not
                                                   ## correctly initialised.
   self._parser = stream.BlockParser(self.got_block, check=stream.Checksum.CHECK)
   self._repo = options.repository
   self._capabilities = [ ]
Пример #5
0
 def __init__(self, *args, **kw):
     print 'Presence handler created'
     WebSocketHandler.__init__(self, *args, **kw)
     self._user = None
     self._closed = False
     IOLoop.instance().add_timeout(time.time() + 5,
                                   self._check_notifications)
Пример #6
0
 def __init__(self, *args, **kwds):
     #---------------------------------
     WebSocketHandler.__init__(self, *args,
                               **kwds)  ## Can't use super() as class is not
     ## correctly initialised.
     self._parser = stream.BlockParser(self.got_block,
                                       check=stream.Checksum.CHECK)
     self._repo = options.repository
     self._capabilities = []
Пример #7
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.active_game = None
     self.player_number = None
     self.ping_interval = 10
     self.message_handlers = {
         'move': self.handle_move,
         'chat': self.handle_chat,
         'flee': self.handle_flee
     }
Пример #8
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
 def __init__(self, *args, **kw):
     WebSocketHandler.__init__(self, *args, **kw)
     self.application = None
Пример #10
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self._player = None
Пример #11
0
 def __init__(self, *args, **kwargs):
     self.ioloop = IOLoop.instance()
     WebSocketHandler.__init__(self, *args, **kwargs)
Пример #12
0
    def __init__(self, application, request, **kwds):
        ControllerAddon.__init__(self, application, request, **kwds)
        WebSocketHandler.__init__(self, application, request, **kwds)

        self.io_loop = IOLoop.current(False)
Пример #13
0
 def __init__(self, rpc_handler, *args, **kwargs):
     if not issubclass(rpc_handler, RpcHandler):
         raise Exception("Argument rpc_handler must be a subclass of " +
                         "RpcHandler")
     self.rpc_handler = rpc_handler()
     WebSocketHandler.__init__(self, *args, **kwargs)
Пример #14
0
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     HTTPHandler.__init__(self, application, request)
Пример #15
0
 def __init__(self, *args, **kw):
     WebSocketHandler.__init__(self, *args, **kw)
     self.application = None
Пример #16
0
    def __init__(self, *args, **kwargs):

        print('>>> create new handler instance')
        return WebSocketHandler.__init__(self, *args, **kwargs)
Пример #17
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.io_loop = IOLoop.instance()
     self.pub = MQPub(zmq.Context(), 'admin')
Пример #18
0
 def __init__(self, server, *args):
     WebSocketHandler.__init__(self, *args)
     self.server = server
Пример #19
0
    def __init__(self, *args, **kwargs):
        BaseWebSocket.__init__(self, *args, **kwargs)

        self._session = None

        self._channel_table[self.__hash__()] = self
Пример #20
0
    def __init__(self, application, request, **kwargs):
        WebSocketHandler.__init__(self, application, request, **kwargs)

        self.io_loop = IOLoop.current()
        self.logger = logging.getLogger('tornado.application')
        self.user_id = None
Пример #21
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.io_loop = IOLoop.instance()
Пример #22
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.login = False
Пример #23
0
 def __init__(self, rpc_handler, *args, **kwargs):
     if not issubclass(rpc_handler, RpcHandler):
         raise Exception("Argument rpc_handler must be a subclass of " +
             "RpcHandler")
     self.rpc_handler = rpc_handler()
     WebSocketHandler.__init__(self, *args, **kwargs)
Пример #24
0
 def __init__(self, *args, **kwargs):
     self.ioloop = IOLoop.instance()
     WebSocketHandler.__init__(self, *args,**kwargs)
Пример #25
0
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     self.id = str(random.random())[2:]