How to use the autobahn.twisted.websocket.WebSocketServerFactory.__init__ function in autobahn

To help you get started, we’ve selected a few autobahn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github crossbario / crossbar / crossbar / worker / testee.py View on Github external
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)
github DiscreetAI / dml-library-js / server / server.py View on Github external
def __init__(self):
        WebSocketServerFactory.__init__(self)
        self.clients = {"DASHBOARD": [], "LIBRARY": []}
github slush0 / stratum / stratum / websocket_transport.py View on Github external
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)
github grame-cncm / faustplayground / py / faustplayground / broadcastws.py View on Github external
def __init__(self, url) :
        WebSocketServerFactory.__init__(self, url)
        self.clients = {}
github EricssonResearch / calvin-base / calvin / runtime / south / plugins / web / twistedimpl / wsbroadcast.py View on Github external
def __init__(self, url):
        WebSocketServerFactory.__init__(self, url)
        self.clients = []
        self.tickcount = 0
github crossbario / autobahn-python / autobahn / autobahn / wamp1 / protocol.py View on Github external
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)
github crossbario / autobahn-python / examples / twisted / websocket / wxpython / server.py View on Github external
def __init__(self, url):
        WebSocketServerFactory.__init__(self, url)
        self.clients = []
github ParadropLabs / Paradrop / paradrop / daemon / paradrop / backend / log_sockjs.py View on Github external
def __init__(self, chute):
        WebSocketServerFactory.__init__(self)
        self.transports = set()
        self.chute = chute
github borismus / keysocket / server-linux / keysocket.py View on Github external
def __init__(self, url):
    WebSocketServerFactory.__init__(self, url)
    self.keys_listener = DBusMediaKeyListener(callback=self._onMediaKeyEvent)
    self._clients = []
github deguss / rpilogger / wsserver / tailf-server.py View on Github external
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)