I have tried to setup a BytesTransferred event as follows:
public class Ftp : FTPClient {
public Ftp() {
RemoteHost = RegistryKeys.ftpServer;
this.BytesTransferred += new BytesTransferredHandler(Ftp_BytesTransferred2);
Connect();
User(RegistryKeys.ftpLogin);
Password(RegistryKeys.ftpLoginPassword);
TransferType = FTPTransferType.BINARY;
ChDir(RegistryKeys.ftpFolderName);
this.BytesTransferred += new BytesTransferredHandler(Ftp_BytesTransferred);
}
public void resetDirectory() {
ChDir("");
ChDir(RegistryKeys.ftpFolderName);
}
private void Ftp_BytesTransferred(object ftpClient, BytesTransferredEventArgs bytesTransferred) {
Console.Write("Yes!");
}
private void Ftp_BytesTransferred2(object ftpClient, BytesTransferredEventArgs bytesTransferred) {
Console.Write("Yes!");
}
}
This is my own little FTP class I use just so I can initiate the connect how I'd like, etc.
Anyway, I've stepped through everything, and the event just isn't firing. I am using the Put() method while looping through a list of files, but I get no event firing.
Any thoughts?