Esempio n. 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()
Esempio n. 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)
Esempio n. 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()
Esempio n. 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 = [ ]
Esempio n. 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)
Esempio n. 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 = []
Esempio n. 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
     }
Esempio n. 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
Esempio n. 10
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self._player = None
Esempio n. 11
0
 def __init__(self, *args, **kwargs):
     self.ioloop = IOLoop.instance()
     WebSocketHandler.__init__(self, *args, **kwargs)
Esempio n. 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)
Esempio n. 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)
Esempio n. 14
0
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     HTTPHandler.__init__(self, application, request)
Esempio n. 15
0
 def __init__(self, *args, **kw):
     WebSocketHandler.__init__(self, *args, **kw)
     self.application = None
Esempio n. 16
0
    def __init__(self, *args, **kwargs):

        print('>>> create new handler instance')
        return WebSocketHandler.__init__(self, *args, **kwargs)
Esempio n. 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')
Esempio n. 18
0
 def __init__(self, server, *args):
     WebSocketHandler.__init__(self, *args)
     self.server = server
Esempio n. 19
0
    def __init__(self, *args, **kwargs):
        BaseWebSocket.__init__(self, *args, **kwargs)

        self._session = None

        self._channel_table[self.__hash__()] = self
Esempio n. 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
Esempio n. 21
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.io_loop = IOLoop.instance()
Esempio n. 22
0
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.login = False
Esempio n. 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)
Esempio n. 24
0
 def __init__(self, *args, **kwargs):
     self.ioloop = IOLoop.instance()
     WebSocketHandler.__init__(self, *args,**kwargs)
Esempio n. 25
0
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     self.id = str(random.random())[2:]