Indy FTP, large files and NAT routers

Posted by Lobuno on Stack Overflow See other posts from Stack Overflow or by Lobuno
Published on 2010-04-19T07:28:59Z Indexed on 2010/04/19 7:33 UTC
Read the original article Hit count: 522

Filed under:
|

Hello!

I have been using Indy to transfers files via FTP for years now but have not been able to find a satisfactory solution for the following problem.

When a user is uploading a large file, behind a router, sometimes the following happens: the file is uploaded OK, but under the mean time the command channel gets disconnected because of a timeout. Normally this doesn't happens with a direct connection to the server, because the server "knows" that a transfer is being taking place on the data channel. Some routers are not aware of this, though and the command channel is closed.

Many programs send a NOOP command periodically to keep the command channel alive even if this is not part of the standard FTP specification. My question: how do I do that? Do I send the NOOP command in the OnWork event? Does this cause any collateral damage in some way, like, do I need to process some response? How do I best solve this problem?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about indy