Thread: Interfacing with an external ftp client

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    141

    Interfacing with an external ftp client

    Hi,

    What I want to do is build an interface to a ftp client.

    I use the following code:
    Code:
    using System.Collections.Generic;
    using System.Text;
    using WeOnlyDo.Client;
    
    namespace TestFtp
    {
       abstract class FtpConn
       {
    
           FtpDLX ftpOne = new FtpDLX();
           ftpOne.Hostname = "22.21.231.222 [3]";
           ftpOne.Protocol = "FTP";
           ftpOne.Connect();
           ftpOne.PutFile(@"C:AKHello.txt","/home/akar");
    
       }
    }
    This code is not recognizing ftpOne as an object of FtpDLX. I've put
    a reference to the WeOnlyDo.Client.FTP.dll in my project. What am I
    missing?
    Appreciate your guidance.

    Thanks,
    AK

  2. #2
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Follow the basic layout of classes, a class has fields, methods , destructor and constructor...

    What it does not have for sure is something you wrote...

    Put those method calls in some kind of method ... , assign the vars like FTP, and hostname in the constructor or another suited place.

    Code:
    using System.Collections.Generic;
    using System.Text;
    using WeOnlyDo.Client;
    
    namespace TestFtp
    {
       abstract class FtpConn
       {
    	   
    	   private FtpDLX ftpOne;
    	   
    	   public FtpConn() {
    		   this.ftpOne = new FtpDLX();
    		   this.ftpOne.Hostname = "22.21.231.222 [3]";
    		   this.ftpOne.Protocol = "FTP";
    		   this.ftpOne.Connect();
    	   }
    	   public void PutFile(string a , string b) {
    		   this.ftpOne.PutFile(a,b);
    	   }
    	   
    
       }
    }
    That looks more like a class to me.

    Sry for the crappy indentation, thats because of how cboard handles copy paste code tags when typing your own post.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    141
    Thanks a lot GL

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  4. [C++] FTP client problem (winsock)
    By Niekie in forum Networking/Device Communication
    Replies: 2
    Last Post: 10-19-2003, 09:23 AM
  5. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM