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,401 of 14,669    |
|    Jorgen Grahn to All    |
|    Can accept() block when the listener is     |
|    19 Feb 10 07:57:50    |
      From: grahn+nntp@snipabacken.se              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.              *Thinking*              The three-way handshake is supposed to be finished by the time select       says the listener is readable, isn't it? Then accept() shouldn't have       to block. I was somehow thinking accept triggered the last 2/3 of the       handshake, and thus might have to wait for RTT and retransmissions.              /Jorgen              --        // Jorgen Grahn |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca