Flushing on error

Giganews Newsgroups
Subject: Flushing on error
Posted by:  Michael J. Leaver (spam@mjleaver.com)
Date: Tue, 18 Jan 2005

Sometimes the FTP communication gets out-of-sync (usually after an
abort). What is the best way to flush everything so the communication
can start again (on the client side)?

For Indy 10 I'm trying this:

      FTPClient.IOHandler.InputBuffer.Clear;
      FTPClient.IOHandler.WriteBufferFlush;
      FTPClient.IOHandler.WriteBufferClear;

For Indy 9 I can only think of the following:

      FTPClient.InputBuffer.Clear;

Are the above OK or is there a better/correct way?

Thanks

Replies