On Wed, Dec 12, 2007 at 08:57:18PM -0500, Daniel Ouellet wrote: > Otto Moerbeek wrote: >> I did not follow the complete thread, but I like to mention one thing: >> there might be half open connections involved here. A client might do a >> half close (i.e. shutdown(SHUT_WR)) after sending >> a request. This will make the connection a half-duplex one. iirc, after >> the >> shutdown, the server moves to CLOSE_WAIT, but will still be able to >> send data to the client, until it decides that it is done and closes >> down the connection. > > Thanks for your feedback Otto! > > I keep reading this and may be my English is not getting it fully. For my > own knowledge and understanding, when you say half open and haft close. In > both cases they needed and have done the full three step handshake or may > be skip some of it? > > In other word they can or can't reach the CLOSE_WAIT without doing the full > complete and proper three step handshake? > > I would appreciate to understand that for myself as I thought it was clear, > but I guess I still have a gap unfill. (;>
I'm only talking about the tear-down. The three-way handshake happens before that, both sockets are in ESTABSLIHED state. You have to read half-close as a verb (action), and half-open as a description of the state of the connection. Check the state transition diagram, and maybe do some reading in Stevens's TCP/Illustrated Volume I (which has the state diagram on the inside cover ;-) -Otto