New topic: 

TCP send buffer

<http://forums.realsoftware.com/viewtopic.php?t=399>

         Page 1 of 1
   [ 7 posts ]                 Previous topic | Next topic          Author  
Message        damon          Post subject: TCP send bufferPosted: Mon Oct 17, 
2005 8:55 pm                         
Joined: Mon Oct 17, 2005 6:43 pm
Posts: 91                Hi Guys, 
is there a way to tell what the TCP send socket buffer size is , or set it? 
 
I have a TCP app which when sending packets (8K) gets to 100K at the speed of 
light then drops back to normal. When it finishes sending the reciever has to 
wait to recieve about 100K before acknowledging receipt of the document. If I 
can lower the buffer size then this wait would be less and the sender and 
reciever would finish at nearly the same time. 
 
Thanks 
Damon   
                             Top                Aaron Ballman          Post 
subject: Posted: Tue Oct 18, 2005 8:23 am                                 
Joined: Wed Sep 28, 2005 8:39 am
Posts: 9340
Location: St Augusta, MN                The internal send buffer tries to send 
with the max throughput, but usually settles on about 64K sends. 
 
However, I am a bit confused by your explanation.  Can you elaborate?      
_________________
Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever 
encounter!  
                             Top                 blakeyrat          Post 
subject: Posted: Tue Oct 18, 2005 2:25 pm                                 
Joined: Mon Oct 03, 2005 5:33 pm
Posts: 464                Are you talking about manually sending acks from your 
program?  I'm kind of lost myself.   
                             Top                damon          Post subject: 
Posted: Tue Oct 18, 2005 4:29 pm                         
Joined: Mon Oct 17, 2005 6:43 pm
Posts: 91                Hi Aaron and Blakey, 
 
OK I have made a FTP client and server for a VPN. 
 
The files going are compressed and encoded before they are sent and 
decompressed and decoded by the recievers client at the other end. The server 
works on a mailbox system (EDI document system is the main purpose of the 
system). 
 
When the sender starts to send a large file, lets say 3 meg, it sends the 
packets in 8K chunks. On the screen it displays similar to this 
send 0 to 7999 
send 8000 to 15999 
send 16000 to 23999 
etc.... 
 
It gets to about 100,000 in less than a second then clicks over at the normal 
transfer rate depending on the connection speed. SO the first second it is 
obviously filling a internal send buffer with data and when it is full then it 
reverts to a FIFO process 
 
So at the senders, the program thinks it has sent upto position 100,000 in the 
file where as the server, which is recieving the file is at position 0. 
 
The problem is that the sender finishes about 8 minutes before the reciever 
finishes recieving the last packet, if it is a dial up connection (56K). 
 
If I can change the senders send buffer size to 10K instead of 100K then this 
period between when the sender believes it has finished and the reciever 
acknolwedges the receipt of the last packet would be about a minute. 
 
At the moment the sender thinks everything is sent and tries to disconnect even 
though the information is still being sent from the internal sending buffer. 
 
Hope this explains the question. 
 
Thanks 
Damon   
                             Top                Aaron Ballman          Post 
subject: Posted: Tue Oct 18, 2005 4:50 pm                                 
Joined: Wed Sep 28, 2005 8:39 am
Posts: 9340
Location: St Augusta, MN                How are you determining whether the 
data's truly been sent?  Are you checking TCPSocket.BytesLeftToSend?  Because 
that's the only accurate measure of how much data is left to be physically 
sent.      
_________________
Check out Ramblings on REALbasic, the hottest book on REALbasic you'll ever 
encounter!  
                             Top                 julio1965          Post 
subject: similar kind of problemPosted: Wed Oct 19, 2005 12:16 pm               
          
Joined: Wed Oct 19, 2005 11:57 am
Posts: 16                I have a quite similar problem of a correct feedback 
of sending data using sockets. 
 
I have an application that submits a form to a php page, in the POST i send to 
the server also an attached file of about 1 MB. the sending process is repeated 
in a cycle with different file uploaded to the server. 
 
a progressbar indicates the progress of the upload operation 
 
on OS X all is working fine, and I have my progressbar correctly indicates the 
ongoing of the operation, and at the end of the upload I wait only some seconds 
for the server response. 
 
The problem is on the Windows side, where a lot of SendProgress events are 
fired repeatedly in a couple of seconds, and then all remains silent until the 
server responds and I have a pageReceived event a lot of time after. 
 
In reality all works fine, and the file is correctly uploaded, my problem is 
only that I have no way to give the user a feedback of the ( long ) wait for 1 
MB to upload 
 
thans 
 
  Giulio   
                             Top                 weathermon          Post 
subject: Re: TCP send bufferPosted: Fri Aug 12, 2011 9:05 pm                    
     
Joined: Sun Jun 29, 2008 6:32 am
Posts: 22                Did anyone end up finding a solution to this?

I've made a passive FTP class that uploads files and it looks like it fills 
some sort of internal buffer. Even though I am using the "Sendcomplete" event, 
it "finishes" the upload and then sits there for quite some time while the 
internal buffer catches up. I literally watch the file size getting larger on 
the server end even though the upload has "finished".   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 7 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to