🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1288

Re: Indy 9 TrivialFTP Questions:

#1288
From: Paul at NCF
Date: Fri, 16 Feb 2007 08:50
40 lines
2928 bytes
Hi Remy,

> The transfer complete is done when the file write thread is destroyed. 
> The file write thread has a default receive timeout of 1.5s.  So it looks 
> like the server is timing out on the write operation.  Reading

I've been looking through the code for the server and client for these 
components in Indy9.  Do you think it would be better for the server to 
release the file handle when the last block has been read/written, and for 
the server to just keep re-transmitting the last block, or process the last 
ack?  This way the file handle is released early for use, not sure if the 
transfer complete should also be called then too?  Any impacts?

I've determined the following behaviour from the code:

Server:

1)  The receive timeout is the same regardless of buffer size (1.5s).  The 
server has a three retry receive timeout limit.
2)  The server waits 4.5s in total if nothing is received (if not processing 
last block).  Otherwise its 1.5s.
3)  The server retransmits the previous DATA or ACK block if it receive 
timeouts.
4)  If the client misbehaves when reading and sends an ACK with the wrong 
block, the server will continuously re-transmit the previous block. Or if 
the server and client get out of sync (eg. due to buggy implementations).
5)  If the client misbehaves when writing and sends a block with an 
unexpected block number, the server will continuously re-transmit the 
previous ACK. Or if the server and client get out of sync (eg. due to buggy 
implementations).

Client:

1)  Any receive timeout terminates transfer.
2)  Only the server checks the block sequences, the client assumes the 
server block numbers are always correct, and only checks that they increase.

Regards,

Paul
Technical Details
Message-ID: <45d57053@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45cee6cb@newsgroups.borland.com> <45cf9149$1@newsgroups.borland.com> <45d02a9b@newsgroups.borland.com> <45d02e46$1@newsgroups.borland.com> <45d17236@newsgroups.borland.com> <45d18c50$1@newsgroups.borland.com> <45d2cfe0@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,345d5958a6f3add0
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Paul at NCF" <notplmacca@clara.co.uk>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <45cee6cb@newsgroups.borland.com> <45cf9149$1@newsgroups.borland.com> <45d02a9b@newsgroups.borland.com> <45d02e46$1@newsgroups.borland.com> <45d17236@newsgroups.borland.com> <45d18c50$1@newsgroups.borland.com> <45d2cfe0@newsgroups.borland.com>
Subject: Re: Indy 9 TrivialFTP Questions:
Date: Fri, 16 Feb 2007 08:50:46 -0000
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 86.132.251.81
Message-ID: <45d57053@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1171615827 86.132.251.81 (16 Feb 2007 00:50:27 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail