Thread: Looking for FTP client tutorial

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    16

    Looking for FTP client tutorial

    Hello,

    I recently created a client/server program using c. Next I'm going to have a go at making an ftp client has user login however I can't find any tutorials on the net or in books relating to ftp socket programming.

    Has anyone here got any linkage to such material?

    Thanks.

  2. #2
    Ex scientia vera
    Join Date
    Sep 2007
    Posts
    477
    "FTP Socket programming" doesn't exist. At least not in the way you seem to think it does.

    FTP is an application level protocol in the OSI layercake. What does this mean? Well, if you intend on doing network programming, you should know, so start by googling "OSI Model." This means that FTP uses the standard internet protocols, e.g. UDP and TCP. Depending on how low you're going, you normally only see the packet as you send it out, e.g. what you put in a buffer and send out.
    There is much more to it. The OSI model uses protocol encapsulation. This means that your packet looks something like this:

    Code:
    VeryLowLevelHeaders
    {
         EthernetHeader
         {
              IPHeader
              {
                   UDP/TCPHeader
                   {
                        ApplicationData - This is where you would be doing your FTP stuff.
                   }
              }
         }
    }
    There is much more to the model, so you should read up on it. When you've understood that, you should read the RFC for the FTP protocol and implement its specifications on the FTP protocol.
    "What's up, Doc?"
    "'Up' is a relative concept. It has no intrinsic value."

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Moved to Networking/Device Communication forum.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    First place to go: the RFC for FTP ASAP.
    Or find a library that simplifies it for your platform. If you need to learn sockets, Beej's Guide is a great place to start.

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    16
    Sorted
    Last edited by Dr.Zoidburg; 02-10-2009 at 10:37 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket Programming Problem!!!!
    By bobthebullet990 in forum Networking/Device Communication
    Replies: 2
    Last Post: 02-21-2008, 07:36 PM
  2. WSAAsyncSelect Socket Model. She's Not Hot.
    By Tonto in forum Networking/Device Communication
    Replies: 2
    Last Post: 03-24-2007, 08:34 AM
  3. Client works on a LAN but don't send all the data
    By Niara in forum Networking/Device Communication
    Replies: 9
    Last Post: 01-04-2007, 04:44 PM
  4. Need winsock select() client & server source code or tutorial
    By draggy in forum Networking/Device Communication
    Replies: 2
    Last Post: 06-19-2006, 11:49 AM
  5. Replies: 1
    Last Post: 09-18-2005, 09:06 PM