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,404 of 14,669   
   Jorgen Grahn to Barry Margolin   
   Re: Can accept() block when the listener   
   19 Feb 10 08:56:31   
   
   From: grahn+nntp@snipabacken.se   
      
   On Fri, 2010-02-19, Barry Margolin wrote:   
   > In article ,   
   >  Jorgen Grahn  wrote:   
   >   
   >> A short TCP question: if I have a listening (server) socket, and   
   >> select says it is readable, can I call accept() on it and expect it   
   >> not to block, even if the client/peer host/network dies at that very   
   >> moment? Stevens and the Linux man page says so, but only implicitly,   
   >> by saying it will block if the fd isn't readable.   
   >   
   > You can't read or write on a listening socket, the only thing you can do   
   > with it is accept().   
      
   Sorry, I should have put "readable" in quotes. It's select()'s   
   terminology.   
      
   [...]   
      
   Thanks!   
      
   /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