From: rick.jones2@hp.com   
      
   Barry Margolin wrote:   
   > In article ,   
   > Rick Jones wrote:   
   > > 99 times out of ten, the connection is fully established before   
   > > accept() is called right?   
      
   > Really? Most of the time, the server blocks in accept(), waiting   
   > for a connection to be established.   
      
   Right - but the connection indication is not sent upstream until the   
   handshake is complete, so accept() does not complete (OK, *slight*   
   moving of the goalposts from called to completed) until the handshake   
   is complete. There are options for "eager" or "early" sending of the   
   notification upstream but I wasn't under the impression they were   
   common.   
      
   > What I was thinking about, though, was techniques like SYN cookies,   
   > which are used to deal with SYN-flood attacks. These wouldn't be   
   > effective if we considered the connection to be established as soon as   
   > we sent the SYN/ACK.   
      
   I thought that SYNcookies were to help avoid reserving TCP state in   
   the server, not avoid unwanted forks (or pthread creates or whatnot).   
      
   rick jones   
   --   
   a wide gulf separates "what if" from "if only"   
   these opinions are mine, all mine; HP might not want them anyway... :)   
   feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|