def __init__(self, app, bookkeep=False): self.app = app self._clients = {} if bookkeep: self.propagate = self._propagate WebSocketsResource.__init__(self, TwistedWebSocketFactory(app, bookkeep, self._clients))
def __init__(self, app, bookkeep=False, clients=None): self.app = app self.clients = clients if clients is None: self.clients = {} if bookkeep: self.propagate = self.do_propagate WebSocketsResource.__init__(self, TwistedWebSocketFactory(app, bookkeep, self.clients))
def __init__(self, app, bookkeep=False, clients=None): self.app = app self.clients = clients if clients is None: self.clients = {} if bookkeep: self.propagate = self.do_propagate WebSocketsResource.__init__( self, TwistedWebSocketFactory(app, bookkeep, self.clients))