コード例 #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
ファイル: request.py プロジェクト: Magic347/whirlwind
	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
ファイル: webstream.py プロジェクト: dbrnz/biosignalml-server
 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
ファイル: user.py プロジェクト: mozilla-services/presence
 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
ファイル: websocket.py プロジェクト: Badzyo/tic-tac-toe
 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
ファイル: tornadocomm.py プロジェクト: arthur00/magnacartas
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self._player = None
コード例 #11
0
ファイル: frontend.py プロジェクト: prodigeni/ktorrent
 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
ファイル: socket.py プロジェクト: yayanheeh/api
 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
ファイル: app.py プロジェクト: nickolaylavrinenko/experiments
    def __init__(self, *args, **kwargs):

        print('>>> create new handler instance')
        return WebSocketHandler.__init__(self, *args, **kwargs)
コード例 #17
0
ファイル: admin.py プロジェクト: Nico0084/domogik
 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
ファイル: main.py プロジェクト: miohtama/mopedwarriors
 def __init__(self, server, *args):
     WebSocketHandler.__init__(self, *args)
     self.server = server
コード例 #19
0
ファイル: websocket.py プロジェクト: shiroyuki/Tori
    def __init__(self, *args, **kwargs):
        BaseWebSocket.__init__(self, *args, **kwargs)

        self._session = None

        self._channel_table[self.__hash__()] = self
コード例 #20
0
ファイル: server.py プロジェクト: tolstoyevsky/shirow
    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
ファイル: admin.py プロジェクト: Ecirbaf36/domogik
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.io_loop = IOLoop.instance()
コード例 #22
0
ファイル: server.py プロジェクト: aisk/BrowserQuest
 def __init__(self, application, request, **kwargs):
     WebSocketHandler.__init__(self, application, request, **kwargs)
     self.login = False
コード例 #23
0
ファイル: RpcHandler.py プロジェクト: loiters/glove-commander
 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
ファイル: frontend.py プロジェクト: kzahel/ktorrent
 def __init__(self, *args, **kwargs):
     self.ioloop = IOLoop.instance()
     WebSocketHandler.__init__(self, *args,**kwargs)
コード例 #25
0
ファイル: websocketsource.py プロジェクト: IvoryRaptor/dance
 def __init__(self, application, request):
     WebSocketHandler.__init__(self, application, request)
     self.id = str(random.random())[2:]