def connect_client_factory(url, factoryFactory, *args, **kwargs): connect_params = dict(fpad=False) # no proxy, direct tcp/rtmp connection scheme, host, port, app = parse_rtmp_url(url) factory = factoryFactory(url, connect_params, *args, **kwargs) reactor.connectTCP(host, port, factory) return factory
def _parse_url(self, url): scheme, host, port, path = parse_rtmp_url(url) app, napp, args = parse_normalize_app(path) # self._url here is just teh base of the url self._url = unparse_rtmp_url((scheme, host, port, None)) if self.cred: self.cred.uri = '/' + napp self._app_path = app self._app_path_args = args self._app_path_auth_args = []
def _parse_url(self, url): scheme, host, port, path = parse_rtmp_url(url) self._url = url self._app_path = path