Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, config, templates):
"""
:param config: Crossbar transport configuration.
:type config: dict
"""
options = config.get('options', {})
server = "Crossbar/{}".format(crossbar.__version__)
externalPort = options.get('external_port', None)
WebSocketServerFactory.__init__(self,
url=config.get('url', None),
server=server,
externalPort=externalPort)
# transport configuration
self._config = config
# Jinja2 templates for 404 etc
self._templates = templates
# set WebSocket options
set_websocket_options(self, options)
def __init__(self):
WebSocketServerFactory.__init__(self)
self.clients = {"DASHBOARD": [], "LIBRARY": []}
def __init__(self, port, is_secure=False, debug=False, signing_key=None, signing_id=None,
event_handler=GenericEventHandler):
self.debug = debug
self.signing_key = signing_key
self.signing_id = signing_id
self.protocol = WebsocketServerProtocol
self.event_handler = event_handler
if is_secure:
uri = "wss://0.0.0.0:%d" % port
else:
uri = "ws://0.0.0.0:%d" % port
WebSocketServerFactory.__init__(self, uri)
def __init__(self, url) :
WebSocketServerFactory.__init__(self, url)
self.clients = {}
def __init__(self, url):
WebSocketServerFactory.__init__(self, url)
self.clients = []
self.tickcount = 0
def __init__(self,
url,
debug = False,
debugCodePaths = False,
debugWamp = False,
debugApp = False,
externalPort = None,
reactor = None):
self.debugWamp = debugWamp
self.debugApp = debugApp
WebSocketServerFactory.__init__(self,
url,
protocols = ["wamp"],
debug = debug,
debugCodePaths = debugCodePaths,
externalPort = externalPort,
reactor = reactor)
WampFactory.__init__(self)
def __init__(self, url):
WebSocketServerFactory.__init__(self, url)
self.clients = []
def __init__(self, chute):
WebSocketServerFactory.__init__(self)
self.transports = set()
self.chute = chute
def __init__(self, url):
WebSocketServerFactory.__init__(self, url)
self.keys_listener = DBusMediaKeyListener(callback=self._onMediaKeyEvent)
self._clients = []
def __init__(self, *args, **kwargs):
WebSocketServerFactory.__init__(self, *args, **kwargs)
self.clients = []
self.numClients=0
self.process = ProcessProtocol(self)
reactor.spawnProcess(self.process, "tail", args=logarr, usePTY=True)