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,898 of 14,669   
   Barry Margolin to Michael Podolsky   
   Re: A RST signal set on connection close   
   18 Oct 12 14:33:33   
   
   79b567ad   
   From: barmar@alum.mit.edu   
      
   In article   
   <7b18bb5b-0332-430a-bc8e-d6d860766cef@b15g2000yqk.googlegroups.com>,   
    Michael Podolsky  wrote:   
      
   > Thanks for the explanation.   
   >   
   > On Oct 18, 12:40 pm, Barry Margolin  wrote:   
   >   
   > > If you want your sockets code to be portable, don't close the connection   
   > > if you're not really done with it. Use shutdown() to send a FIN, and   
   > > then just suck up any data that keeps arriving until the client closes   
   > > the connection.   
   >   
   > As for the portability and overall robust functionality, how would you   
   > consider shutdowning just the sending side and   
   > then immediately closing the socket, i.e:   
   >   
   > //server side:   
   > shutdown(socket, SHUT_WR);   
   > close(socket);   
   >   
   > which is supposed to allow the server not to read the rest of the   
   > client's data?   
   >   
   > Should it work correctly and reasonably? If not, why?   
      
   I don't think it will help. I think the way the Windows stack works is   
   that once you shutdown the RD direction, either with shutdown() or   
   close(), any segments received after that will trigger a RST.   
      
   --   
   Barry Margolin   
   Arlington, MA   
      
   --- 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