示例#1
0
 def __init__(self, bus, settings):
     WebSocketPlugin.__init__(self, bus)
     self.daemon = True
     self.clients = []
     self.style_settings = settings
     self.history = []
     self.history_size = HISTORY_SIZE
示例#2
0
文件: ws.py 项目: opmuse/opmuse
    def __init__(self, bus):
        try:
            import wsaccel
            wsaccel.patch_ws4py()
        except ImportError:
            # wsaccel isn't a requirement. also, this occurs when docs are
            # built on readthedocs.org
            pass

        BaseWebSocketPlugin.__init__(self, bus)
示例#3
0
    def __init__(self, bus):
        """
        This plugin is the board controller. It keeps
        track of all boards and their registered participants.

        You may access the global instance of this plugin
        through the `bus.websockets` attribute.
        """
        WebSocketPlugin.__init__(self, bus)

        # every 30s, we check if we have dead boards
        # and we clean them
        plugins.Monitor(bus, self.drop_dead_boards, 30).subscribe()
    
        # board index to quickly retrieve
        # clients of a given board
        self.boards = {}
示例#4
0
    def __init__(self, bus):
        """
        This plugin is the board controller. It keeps
        track of all boards and their registered participants.

        You may access the global instance of this plugin
        through the `bus.websockets` attribute.
        """
        WebSocketPlugin.__init__(self, bus)

        # every 30s, we check if we have dead boards
        # and we clean them
        plugins.Monitor(bus, self.drop_dead_boards, 30).subscribe()
    
        # board index to quickly retrieve
        # clients of a given board
        self.boards = {}
示例#5
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.metrics_receivers = {}
     self.events_receivers = {}
     self.maintenance_receivers = {}
示例#6
0
 def __init__(self, bus, observer):
     WebSocketPlugin.__init__(self, bus)
     self.observer = observer
示例#7
0
文件: app.py 项目: devkini/chatery
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = {}
示例#8
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.ws_servers_lock = threading.Lock()
     self.ws_clients_lock = threading.Lock()
     self.ws_servers = dict()
     self.ws_clients = dict()
示例#9
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = defaultdict(dict)
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
示例#11
0
 def __init__(self, *pargs, **kwargs):
     WebSocketPlugin.__init__(self, *pargs, **kwargs)
示例#12
0
 def __init__(self, *pargs, **kwargs):
     WebSocketPlugin.__init__(self, *pargs, **kwargs)
示例#13
0
文件: server.py 项目: lis-epfl/DRIC
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = {}
     self.main_client_code = -1
示例#14
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = []
     self.history = []
     self.history_size = HISTORY_SIZE
示例#15
0
文件: ol.py 项目: AlexSnet/oneline
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = {}
示例#16
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
示例#17
0
 def __init__(self, bus):
     WebSocketPlugin.__init__(self, bus)
     self.clients = []
     self.history = []
     self.history_size = HISTORY_SIZE