def _setup_transport(self): if self._transport is None: self._transport = SSLTCPClient(self._host, self._port) if self._proxies: self._transport = ProxyFactory(self._transport, self._proxies, preferred='https') self._setup_parser() if self._transport.get_property("status") != IoStatus.OPEN: self._transport.open()
def _setup_transport(self): if self._transport is None: if self._http_proxy: self._transport = TCPClient(self._http_proxy.host, self._http_proxy.port) else: self._transport = TCPClient(self._host, self._port) if self._proxies: self._transport = ProxyFactory(self._transport, self._proxies, 'http') self._setup_parser() if self._transport.get_property("status") != IoStatus.OPEN: self._transport.open()