Exemplo n.º 1
0
 /// <summary>  
 /// Constructor. Creates the control
 /// socket. Allows setting of control port (normally
 /// set by default to 21).
 /// </summary>
 /// <param name="remoteAddr"> 
 /// the address of the remote host
 /// </param>
 /// <param name="controlPort">
 /// port for control stream
 /// </param>
 /// <param name="log">      
 /// log stream for logging to
 /// </param>		
 /// <param name="timeout">      
 /// the length of the timeout, in seconds		
 /// </param>
 public FTPClient(System.Net.IPAddress remoteAddr, int controlPort, StreamWriter log, int timeout)
 {
     control = new FTPControlSocket(remoteAddr, controlPort, log, timeout);
 }
Exemplo n.º 2
0
 /// <summary>  
 /// Quit the FTP session
 /// </summary>
 public void Quit()
 {
     try
     {
         string reply = control.SendCommand("QUIT");
         string[] validCodes = new string[]{"221", "226"};
         lastValidReply = control.ValidateReply(reply, validCodes);
     }
     finally
     {
         // ensure we clean up the connection
         control.Logout();
         control = null;
     }
 }
Exemplo n.º 3
0
 /// <summary>  
 /// Constructor. Creates the control socket
 /// </summary>
 /// <param name="remoteHost"> 
 /// the remote hostname
 /// </param>
 /// <param name="controlPort"> 
 /// port for control stream
 /// </param>
 /// <param name="log">      
 /// log stream for logging to
 /// </param>		
 /// <param name="timeout">      
 /// the length of the timeout, in milliseconds
 /// </param>
 public FTPClient(string remoteHost, int controlPort, StreamWriter log, int timeout)
 {
     control = new FTPControlSocket(remoteHost, controlPort, log, timeout);
 }
Exemplo n.º 4
0
        /// <summary>  
        /// Constructor. Creates the control socket
        /// </summary>
        /// <param name="remoteAddr"> 
        /// the address of the remote host
        /// </param>
        /// <param name="log">      
        /// log stream for logging to
        /// </param>				
        /// <param name="timeout">      
        /// the length of the timeout, in seconds
        /// </param>
        public FTPClient(IPAddress remoteAddr, 
				 StreamWriter log, int timeout)
        {
            control =
                new FTPControlSocket(remoteAddr, FTPControlSocket.CONTROL_PORT,
                                     log, timeout);
        }
Exemplo n.º 5
0
 /// <summary>  
 /// Constructor. Creates the control socket
 /// </summary>
 /// <param name="remoteHost"> 
 /// the remote hostname
 /// </param>
 /// <param name="log">      
 /// log stream for logging to
 /// </param>		
 /// <param name="timeout">      
 /// the length of the timeout, in milliseconds
 /// </param>
 public FTPClient(string remoteHost, StreamWriter log, int timeout)
 {
     control = new FTPControlSocket(remoteHost, FTPControlSocket.CONTROL_PORT, log, timeout);
 }
Exemplo n.º 6
0
 /// <summary>  
 /// Constructor. Creates the control
 /// socket. Allows setting of control port (normally
 /// set by default to 21).
 /// </summary>
 /// <param name="remoteAddr"> the address of the
 /// remote host
 /// </param>
 /// <param name="controlPort"> port for control stream
 /// 
 /// </param>
 public FTPClient(System.Net.IPAddress remoteAddr, int controlPort)
 {
     control = new FTPControlSocket(remoteAddr, controlPort, null, 0);
 }
Exemplo n.º 7
0
 /// <summary>  
 /// Constructor. Creates the control socket
 /// </summary>
 /// <param name="remoteAddr"> the address of the
 /// remote host
 /// 
 /// </param>
 public FTPClient(System.Net.IPAddress remoteAddr)
 {
     control = new FTPControlSocket(remoteAddr, FTPControlSocket.CONTROL_PORT, null, 0);
 }
Exemplo n.º 8
0
 /// <summary>  
 /// Constructor. Creates the control socket
 /// </summary>
 /// <param name="remoteHost"> the remote hostname
 /// </param>
 /// <param name="controlPort"> port for control stream
 /// 
 /// </param>
 public FTPClient(string remoteHost, int controlPort)
 {
     control = new FTPControlSocket(remoteHost, controlPort, null, 0);
 }
Exemplo n.º 9
0
 /// <summary>  
 /// Constructor. Creates the control socket
 /// </summary>
 /// <param name="remoteHost"> 
 /// the remote hostname 
 /// </param>
 public FTPClient(string remoteHost)
 {
     control = new FTPControlSocket(remoteHost, FTPControlSocket.CONTROL_PORT, null, 0);
 }