On Fri, 20 Feb 2004, Adrian Chadd wrote: > * in ConnStateData::readSomeData(), is it ok to just return if the socket > is marked as half closed? Will a half-closed socket ever be re-opened > somehow?
To explain half-closed connections A TCP connection consists of two independent flows of traffic, each opened by a SYN and closed by a FIN. For a normal HTTP connection where the close is initiated by the server we have connection setup: -> SYN <- SYN+ACK -> ACK request: -> DATA, ACK <- ACK reply: <- DATA, ACK -> ACK connection closed <- FIN -> FIN+ACK <- ACK But in a half-closed connection the client closes it's transmit channel early while the return channel server->client is still kept open to allow responses to requests already sent by the client to be delivered -> SYN <- SYN+ACK -> ACK <-> DATA, ACK -> FIN <- DATA, ACK -> ACK <- FIN -> ACK Regards Henrik