Received: by taz.hyperreal.com (8.6.12/8.6.5) id OAA03082; Fri, 31 May 1996 14:04:23 -0700 Received: from life.ai.mit.edu by taz.hyperreal.com (8.6.12/8.6.5) with SMTP id OAA03070; Fri, 31 May 1996 14:04:20 -0700 Received: from volterra.ai.mit.edu by life.ai.mit.edu (4.1/AI-4.10) for new-httpd@hyperreal.com id AA21026; Fri, 31 May 96 17:04:17 EDT From: rst@ai.mit.edu (Robert S. Thau) Received: by volterra.ai.mit.edu (8.6.12/AI-4.10) id RAA02761; Fri, 31 May 1996 17:04:16 -0400 Date: Fri, 31 May 1996 17:04:16 -0400 Message-Id: <199605312104.RAA02761@volterra.ai.mit.edu> To: new-httpd@hyperreal.com Subject: Re: HTTP/1.1 Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Anyone got any idea how we actually implement this? My threaded server code does a shutdown(1) on the socket, and then waits until EOF is seen on the read side; I think that's the best you can do with the socket API. (The way this is arranged internally, the only resources the server has committed to the connection between the shutdown and the final close are the file descriptor itself, and a ~24-byte entry in a table maintained by http_main.c --- there's no point tying up RAM to hold the stack of a thread that has no more useful work to do. Long-lived keepalive connections get similar treatment; if a new request does come in, of course, a thread is spawned off to handle it. When the moon is right, it even works ;-). rst