Пример #1
0
        internal HttpSettings FillWithDefaults()
        {
            this.dataDirectory = dataDirectory ?? Application.temporaryCachePath;
            this.sslVerifier   = sslVerifier ?? new DefaultSslVerifier();
            this.fileHandler   = fileHandler ?? new DefaultFileHandler();
            this.logger        = logger ?? Debug.unityLogger;

            return(this);
        }
Пример #2
0
 internal HttpStream(Uri uri, HttpSettings settings) : base(null)
 {
     this.baseUrl                  = string.Concat(uri.Scheme, Uri.SchemeDelimiter, uri.Authority);
     this.keepAlive                = new KeepAlive(DateTime.Now + settings.keepAliveTimeout);
     this.uri                      = uri;
     this.tcpClient                = new TcpClient();
     this.sslVerifier              = settings.sslVerifier;
     this.tcpClient.NoDelay        = settings.tcpNoDelay;
     this.tcpClient.SendTimeout    = (int)settings.tcpSendTimeout.TotalMilliseconds;
     this.tcpClient.ReceiveTimeout = (int)settings.tcpReceiveTimeout.TotalMilliseconds;
 }