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,024 of 14,669   
   Jorgen Grahn to davids@webmaster.com   
   Re: shutdown(2) and TCP socket buffers   
   29 Aug 09 05:59:13   
   
   fcf1ba03   
   From: grahn+nntp@snipabacken.se   
      
   On Fri, 28 Aug 2009 16:39:33 -0700 (PDT), David Schwartz   
    wrote:   
   > On Aug 28, 1:41 pm, Jorgen Grahn  wrote:   
   >   
   >> What is the BSD socket call shutdown(fd, SHUT_RD) supposed to do to   
   >> a TCP socket, really? I have a short program where I do   
   >   
   > Doing a shutdown(SHUT_RD) on a TCP socket is not sensible. You have to   
   > remember, that 'shutdown' is protocol-neutral and is designed to   
   > support protocols that have a meaningful way to shut down the read   
   > end.   
      
   OK; I just thought TCP was such a protocol. Making read()s fail and   
   telling the peer on the other side that the socket RX buffer is full   
   seemed right to me -- given that I thought shutdown() on a TCP socket   
   kind of transformed it from two octet streams into just one.   
      
   On the other hand, now that you mention it I cannot quite see the   
   purpose. It doesn't matter if I shutdown or not; I have to design the   
   protocol between the two applications in the same way.   
      
   /Jorgen   
      
   --   
     // Jorgen Grahn    O  o   .   
      
   --- 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