コード例 #1
0
 /// <summary>
 /// Set the port range to use in active mode
 /// </summary>
 /// <param name="portRange">port range to use</param>
 internal void SetActivePortRange(PortRange portRange)
 {
     portRange.ValidateRange();
     activePortRange = portRange;
     if (!portRange.UseOSAssignment)
     {
         Random rand = new Random();
         nextPort = rand.Next(activePortRange.LowPort, activePortRange.HighPort);
         log.Debug("SetActivePortRange(" + activePortRange.LowPort + "," + activePortRange.HighPort + "). NextPort=" + nextPort);
     }
 }
コード例 #2
0
 internal FTPControlSocket()
 {
     this.log = Logger.GetLogger("FTPControlSocket");
     this.synchronizePassiveConnections = false;
     this.strictReturnCodes             = false;
     this.remoteHost                = null;
     this.remoteAddr                = null;
     this.controlPort               = -1;
     this.controlSock               = null;
     this.timeout                   = 0;
     this.writer                    = null;
     this.reader                    = null;
     this.activePortRange           = null;
     this.activeIPAddress           = null;
     this.nextPort                  = 0;
     this.autoPassiveIPSubstitution = false;
 }
コード例 #3
0
 internal FTPControlSocket()
 {
     this.log = Logger.GetLogger("FTPControlSocket");
     this.synchronizePassiveConnections = false;
     this.strictReturnCodes = false;
     this.remoteHost = null;
     this.remoteAddr = null;
     this.controlPort = -1;
     this.controlSock = null;
     this.timeout = 0;
     this.writer = null;
     this.reader = null;
     this.activePortRange = null;
     this.activeIPAddress = null;
     this.nextPort = 0;
     this.autoPassiveIPSubstitution = false;
 }
コード例 #4
0
 internal FTPControlSocket(string remoteHost, int controlPort, int timeout, Encoding encoding)
 {
     this.log = Logger.GetLogger("FTPControlSocket");
     this.synchronizePassiveConnections = false;
     this.strictReturnCodes             = false;
     this.remoteHost                = null;
     this.remoteAddr                = null;
     this.controlPort               = -1;
     this.controlSock               = null;
     this.timeout                   = 0;
     this.writer                    = null;
     this.reader                    = null;
     this.activePortRange           = null;
     this.activeIPAddress           = null;
     this.nextPort                  = 0;
     this.autoPassiveIPSubstitution = false;
     if (this.activePortRange != null)
     {
         this.activePortRange.ValidateRange();
     }
     this.Initialize(new StandardSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp), remoteHost, controlPort, timeout, encoding);
 }
コード例 #5
0
 internal FTPControlSocket(string remoteHost, int controlPort, int timeout, Encoding encoding)
 {
     this.log = Logger.GetLogger("FTPControlSocket");
     this.synchronizePassiveConnections = false;
     this.strictReturnCodes = false;
     this.remoteHost = null;
     this.remoteAddr = null;
     this.controlPort = -1;
     this.controlSock = null;
     this.timeout = 0;
     this.writer = null;
     this.reader = null;
     this.activePortRange = null;
     this.activeIPAddress = null;
     this.nextPort = 0;
     this.autoPassiveIPSubstitution = false;
     if (this.activePortRange != null)
     {
         this.activePortRange.ValidateRange();
     }
     this.Initialize(new StandardSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp), remoteHost, controlPort, timeout, encoding);
 }
コード例 #6
0
 internal void SetActivePortRange(PortRange portRange)
 {
     portRange.ValidateRange();
     this.activePortRange = portRange;
     if (!portRange.UseOSAssignment)
     {
         this.nextPort = new Random().Next(this.activePortRange.LowPort, this.activePortRange.HighPort);
         this.log.Debug(string.Concat(new object[] { "SetActivePortRange(", this.activePortRange.LowPort, ",", this.activePortRange.HighPort, "). NextPort=", this.nextPort }));
     }
 }
コード例 #7
0
ファイル: FTPClient.cs プロジェクト: Nathan-M-Ross/i360gm
 public FTPClient()
 {
     this.dirEmptyStrings = new DirectoryEmptyStrings();
     this.transferCompleteStrings = new TransferCompleteStrings();
     this.fileNotFoundStrings = new FileNotFoundStrings();
     this.modtimeFormats = new string[] { "yyyyMMddHHmmss", "yyyyMMddHHmmss'.'f", "yyyyMMddHHmmss'.'ff", "yyyyMMddHHmmss'.'fff" };
     this.control = null;
     this.data = null;
     this.timeout = 0x1d4c0;
     this.noOperationInterval = 0;
     this.strictReturnCodes = false;
     this.cancelTransfer = false;
     this.transferNotifyListings = false;
     this.resume = false;
     this.deleteOnFailure = true;
     this.mdtmSupported = true;
     this.sizeSupported = true;
     this.resumeMarker = 0L;
     this.showHiddenFiles = false;
     this.monitorInterval = 0x1000L;
     this.transferBufferSize = 0x1000;
     this.parserCulture = CultureInfo.InvariantCulture;
     this.fileFactory = new EnterpriseDT.Net.Ftp.FTPFileFactory();
     this.transferType = FTPTransferType.ASCII;
     this.connectMode = FTPConnectMode.PASV;
     this.synchronizePassiveConnections = false;
     this.activePortRange = new PortRange();
     this.activeIPAddress = null;
     this.controlPort = -1;
     this.remoteHost = null;
     this.autoPassiveIPSubstitution = false;
     this.closeStreamsAfterTransfer = true;
     this.controlEncoding = null;
     this.dataEncoding = null;
     this.throttler = null;
     this.InitBlock();
 }
コード例 #8
0
ファイル: FTPControlSocket.cs プロジェクト: tinygg/Tools.Net
 /// <summary>
 /// Set the port range to use in active mode
 /// </summary>
 /// <param name="portRange">port range to use</param>
 internal void SetActivePortRange(PortRange portRange)
 {
     portRange.ValidateRange();
     activePortRange = portRange;
     if (!portRange.UseOSAssignment)
     {
         Random rand = new Random();
         nextPort = rand.Next(activePortRange.LowPort,activePortRange.HighPort);
         log.Debug("SetActivePortRange("+ activePortRange.LowPort + "," + activePortRange.HighPort + "). NextPort=" + nextPort);
     }
 }