Esempio n. 1
0
        public void Setup(ReplicationOptions options)
        {
            _remoteRequestCancellationSource?.Cancel();
            _remoteRequestCancellationSource = CancellationTokenSource.CreateLinkedTokenSource(_cancellationTokenSource.Token);
            ClientFactory.SocketTimeout      = options.SocketTimeout;
            var clientObj = ClientFactory.GetHttpClient(CookieStore, options.RetryStrategy);

            clientObj.Timeout = options.RequestTimeout;
            clientObj.SetConcurrencyLimit(options.MaxOpenHttpConnections);
            _client = clientObj;
        }
        public void Setup(ReplicationOptions options)
        {
            _remoteRequestCancellationSource?.Cancel();
            _remoteRequestCancellationSource = CancellationTokenSource.CreateLinkedTokenSource(_cancellationTokenSource.Token);
            ClientFactory.SocketTimeout      = options.SocketTimeout;
#if __ANDROID__
            var clientObj = ClientFactory.GetHttpClient(CookieStore, options.RetryStrategy, options.TrustedServerCert);
#else
            var clientObj = ClientFactory.GetHttpClient(CookieStore, options.RetryStrategy);
#endif
            clientObj.Timeout = options.RequestTimeout;
            clientObj.SetConcurrencyLimit(options.MaxOpenHttpConnections);
            clientObj.Authenticator = Authenticator;
            _client = clientObj;
        }