[Xitami] Maybe solution for interrupted download of long files on slow connection after 32k (or multiples)
Dario B.
xitami@lists.xitami.org
Mon, 30 Aug 2004 13:43:52 +0200
With the last versions of xitami I noticed that on slow connections
(dial-up) it often happens that the connection breaks and there is a socket
error; even downloading Xitami i had to use getright because of the
disconections.
I tried to solve this recompiling with Borland C++ builder (it was
difficoult... some things was quite tricky to make it work... lots of
warnings and some errors... but I did it somehow).
I think it's some timeout error on writing on the socket: if I understood
how it works, when a file is uploaded is divided in segments and uploaded,
and there is a timeout for every segment to be sent. The size of the segment
is in the file "smttran.c", the "var" name is "BUFFERSIZE" and is initially
set to 32768L, (32k), the timeout is specified in "smtsock.c" and is named
"WRITE_TIMEOUT" and is set to 10 (seconds); this means that if you can get
more than 32k in 10 sec (>3.2kbyte/sec) everything should be ok, otherwise
the socket "thinks" he isn't able to send data. I tried lowering BUFFERSIZE
to 4096 (4k) and WRITE_TIMEOUT to 60 sec (it makes about 70 bytes/sec should
be enough!) and it seems to work.
I hope at Imatix try this so, if it works, everyone can use it.
Dario B.
(sorry for my english, I'm Italian)