Re: half-closed connections?

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 20 Feb 2004 14:40:34 +0100 (CET)

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
Received on Fri Feb 20 2004 - 06:40:42 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:04 MST