On Jan 2, 2007, at 4:05 PM, Thom McGrath wrote:

I'm trying to build a synchronous socket inside a thread which does some lengthy file transfers and such. I do this to try to keep the UI responsive throughout the process.

Everything is working well, but I am having a problem with keeping track of the progress of transfers. If I simply keep track of BytesLeftToSend, this simply isn't accurate because this becomes 0 long before the receiving end gets the last bytes. So is this simply showing me the number of bytes left to copy into the internal buffer? How can I track the number of bytes actually sent to the other end without asking it for continuous feedback?

I don't think you can. Maybe you could with some declares. The trick is that TCP will retransmit if it does not get an acknowledgment from the other party. So your app could hand it's data to the socket and then the socket sends it. However, you don't know it's been received yet until the other side sends the acknowledgment back.

The benefit to this is that if this side sends it, it will keep sending it until it gets an acknowledgment or it times out. So ordinarily if the connection is made at all, it will all get to the other side barring a network failure or some other catastrophic failure.

I think Aaron reads the forum and not the list, so if you want a more definitive answer about what RBs sockets tell you, then you might want to ask there.

Kevin

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to