Do you mean stopping the transfer, issuing a NOOP, and then resuming the transfer? Does that mean you will issue the NOOP on the transfer connection rather than the control connection? Doesn't the acknowledgement of the transfer completion come on the control connection, and if that is the connection that times out wouldn't it make more sense to issue the NOOP on the control connection? That way you also wouldn't be interrupting the file transfer to keep the control connection alive.
Do you have an idea where I would need to put the modification? I thought something inside the While loop in the PutBinary function in FTPClient.cs might do it:
private void PutBinary(Stream srcStream, string remoteFile, bool append)
{
...
while ((count = input.Read(buf, 0, buf.Length)) > 0 && !cancelTransfer)
{
output.Write(buf, 0, count);
size += count;
monitorCount += count;
if (BytesTransferred != null && monitorCount > monitorInterval)
{
BytesTransferred(this, new BytesTransferredEventArgs(remoteFile, size));
monitorCount = 0;
}
}
...
}