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

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

        self._session = None

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