예제 #1
0
 def __build_websockets_resource(self):
     url = f'ws://{server_config.bind_address}:{server_config.websocket_port}/websockets'
     logger.info(f'Starting websocket server at port '
                 f'{server_config.websocket_port} with bind address {server_config.bind_address}.')
     factory = WorkspaceServerFactory(url=url)
     factory.protocol = BroadcastServerProtocol
     return factory
예제 #2
0
파일: web.py 프로젝트: hecg119/faraday
 def __build_websockets_resource(self):
     websocket_port = int(
         faraday.server.config.faraday_server.websocket_port)
     url = f'ws://{self.__bind_address}:{websocket_port}/websockets'
     # logger.info(u"Websocket listening at {url}".format(url=url))
     logger.info(
         f'Starting websocket server at port '
         f'{self.__websocket_port} with bind address {self.__bind_address}.'
     )
     factory = WorkspaceServerFactory(url=url)
     factory.protocol = BroadcastServerProtocol
     return factory
예제 #3
0
파일: web.py 프로젝트: pklcollins/faraday
    def __build_websockets_resource(self):
        websocket_port = int(
            faraday.server.config.faraday_server.websocket_port)
        url = f'{self.__bind_address}:{websocket_port}/websockets'
        if self.__websocket_ssl_enabled:
            url = 'wss://' + url
        else:
            url = 'ws://' + url
        # logger.info(u"Websocket listening at {url}".format(url=url))
        logger.info(
            'Starting websocket server at port {0} with bind address {1}. '
            'SSL {2}'.format(self.__websocket_port, self.__bind_address,
                             self.__ssl_enabled))

        factory = WorkspaceServerFactory(url=url)
        factory.protocol = BroadcastServerProtocol
        return factory