29-May-03 (Created: 29-May-03) | More in 'dotnet: An FTP implementation'

3. AFtpClient

using System;
using TNT.Common.AppServices;

namespace Network
{
	/// 
	/// Summary description for AFtpClient.
	/// 
	public abstract class AFtpClient : IFtpClient, IInitializable, IMultiInstance
	{
		public abstract string	Username {get;set;}
		public abstract string	Password {get;set;}
		public abstract string	Host {get;set;}
		public abstract int		Port {get;set;}
		public abstract void Open();
		public abstract void SetCurrentDirectory(string sDirectory);
		public abstract void ReceiveFile(string sLocalFilename
			, string sRemoteFilename
			, TransferMode mode);

		public abstract void SendFile(string sLocalFilename
			, string sRemoteFilename
			, TransferMode mode);

		public virtual void initialize(string requestName)
		{
			Host = AppServices.getValue(requestName + "/ftpservername");
			Port = Convert.ToInt32(AppServices.getValue(requestName + "/ftpport"));
			Username = AppServices.getValue(requestName + "/ftpuser","ftp");
			Password = AppServices.getValue(requestName + "/ftppassword","a@a");
		}

	}
}