Thanks for that.  I thought it may be doing that.  The files are not likely
to be over 1MB so I think it'll be fine.

 

Cheers.

 

From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On
Behalf Of Kyley Harris
Sent: Tuesday, 15 February 2011 10:39 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Indy TidTCPServer question

 

The WriteFile already breaks down any stream into small chuncks specified in
the objects properties.. about 8096.. and you can then use its OnWork event
to track progress etc..

Personally.. I tend to not rely on this feature and break down the file
myself so I have more fluid control over the process if it gets interrupted.
(this helps if I swap from indy to something else like synapse)

TCP/IP itself handles packet loss and is a lossless guarantee.. But it
doesn't resume if a connection is broken..any buffered information is lost.
FTP is about recording progress and recconenting to resume.. This is useful
if you are sending large files and you may need to write/manage this
yourself.. I'm not sure as I haven't looked to see if there are any
available indy FTP style objects.

On Tue, Feb 15, 2011 at 10:29 PM, Ross Levis <r...@stationplaylist.com>
wrote:

I'm writing a idTCPClient & idTCPServer apps which as part of their
functions will be to transfer some files.  I'm using idTCPServer.WriteFile()
and idTCPClient.Read(Stream) for this purpose and it's working well.

 

My question is really based on a lack of understanding of TCP or how a plain
idTCPServer handles data transfer.

 

Should I be sending the file in small chunks and validating the data before
sending the next chunk, or does idTCPServer do that for me.  I'm thinking of
how an FTP server is implemented which I believe sends data in small pieces
and awaits feedback after each piece, and I think resends a piece if there
is a problem.

 

Cheers.


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe




-- 
Kyley Harris
Harris Software
+64-21-671-821

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to