Thread: file transmission with ftp

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    22

    file transmission with ftp

    Hy,

    I am programming with C, and I send files with ftp.

    But the connection betwen the client and the server is very bad and I use to loose it. When this appends, the transmission restart from the beginig, but I want to restart it where I loose it. That means, if I send a file and when the connection breaks 80% from the file was sent. When the connection restart, I want to send only the 20% lost.

    Does someone know how to do it.

    Maybe you should know that I am sending a file from the client to the server, and the client must restart the transmission, I can't modify the server's code.

    Thanks a lot.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    http://www.rfc-editor.org/rfc/rfc959.txt
    Quote Originally Posted by rfc959
    error recovery

    A procedure that allows a user to recover from certain errors
    such as failure of either host system or transfer process. In
    FTP, error recovery may involve restarting a file transfer at a
    given checkpoint.
    > and I send files with ftp.
    You've written an FTP client?
    Or are you just doing the equivalent of this
    system("ftp host file");
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    22
    Thanks,

    I will took an eye on this.

    Excuse me, but it is the first time that I use ftp, so I don't know much about it. I think I am writting a client. I am usign FtpPut() to send the file, I hope this helps.

    Thanks again.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Top 184 results of at least 2,990 retrieved for the query FtpPut (details)

    It seems like a pretty high level interface to "ftp" you're using. Since this isn't standard C, you need to be more specific about which OS / Compiler / API you're using if you want more help on say how to use it.

    My guess is read the manual page to see if any other functions talk about restarting a transmission.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  2. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 02:29 PM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM