home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 13,051 of 14,669   
   Barry Margolin to yawnmoth   
   Re: sending next packet before the last    
   15 Sep 09 01:02:48   
   
   04fc4b98   
   From: barmar@alum.mit.edu   
      
   In article   
   <82832582-9526-4f01-a815-40dc5a008fbd@o21g2000vbl.googlegroups.com>,   
    yawnmoth  wrote:   
      
   > I'm trying to upload a 1mb file using SFTP and the upload is taking   
   > quite a bit longer than the download.  I was thinking that, to speed   
   > it up, I might use non-blocking sockets.  Before receiving   
   > confirmation that a portion of a file has been written, I send the   
      
   You seem to be assuming that TCP blocks if you haven't received an   
   acknowledgement.  This is not true.  It only blocks if the lock socket   
   buffer is full, because you're sending much faster than the receiver can   
   read.   
      
   Changing to non-blocking sockets doesn't affect this.  The difference is   
   that when you would have blocked, write() will instead return an   
   EWOULDBLOCK error, and then you'll have to use select() to wait for   
   buffer space to free up.  Either way, you can't send faster than the   
   server can receive.   
      
   > next portion.  The thing I'm worried about is this: might the SFTP   
   > server silently drop packets?   
      
   SFTP runs over TCP, which ensures that everything is received in the   
   order it was sent, with no gaps.   
      
   --   
   Barry Margolin, barmar@alum.mit.edu   
   Arlington, MA   
   *** PLEASE don't copy me on replies, I'll read them in the group ***   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca