Пример #1
0
        public FtpConnector(FtpParams parameters, Encoding encoding)
        {
            ftpClient = parameters.Proxy == null
                ? new FtpClient()
                : new FtpClientHttp11Proxy(parameters.Proxy);

            ftpClient.Encoding = encoding;

            ftpClient.Host           = parameters.Host.Trim();
            ftpClient.Port           = parameters.Port;
            ftpClient.Credentials    = parameters.Credentials;
            ftpClient.ConnectTimeout = parameters.Timeout;
            attempts        = parameters.Attempts < 1 ? 1 : parameters.Attempts;
            attemptsTimeout = parameters.AttemptTimeout < 1000 ? 1000 : parameters.AttemptTimeout;
        }
Пример #2
0
 public FtpConnector(FtpParams parameters) : this(parameters, Encoding.UTF8)
 {
 }