0 votes
by (900 points)

FTP Dispose method internal calls Dispose method.

_ftp.Dispose(); method can Disconnect connection, when it called.

if i am trying to get directory from server is going on and i want to dispose ftp object. so _ftp.Dispose(); method can abort connection, when it called.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (143k points)

I'm not entirely sure what is actually the question...

Calling Ftp object's Dispose method closes its underlying connections and aborts all pending operations in that FTP session. Dispose can be called at any time, regardless the current state of the Ftp instance.

On the other hand, Disconnect method ends the connection gracefully (by sending the QUIT command) and can only be called when the Ftp object is not busy performing another action.