示例#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)
 {
 }