httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael H. Voase" <mvo...@midcoast.com.au>
Subject Re: Using conn->client->fd
Date Sun, 03 Oct 1999 11:18:22 GMT
Gday,

	Use the conn->client->flags value to determine wether the connection
has cloesd. The flag youre looking for is B_EOF. Anyways, just a quick 

	if ( conn->client->flags & B_EOF ) 

	should yeild the test required. There is a wealth of information
in the flag fields that you can use. A couple of handy ones include 
B_RDERR, B_WRERR, B_OUT ( no further output possible ). Consult buff.h
for details...

Cheers Mik.

Eric Cholet wrote:
> 
> I am writing a chat application. One of it's components waits on data from
> the chat server and sends it to the client (browser). I need to know when
> the client has disconnected. I get the browser's fd from
> r->connection->client->fd, and do a select() waiting for either the browser
> or the chat server to have data available. Even though I'm not reading from
> the browser a hangup will be seen as a zero length packet becoming
> available for reading.
> 
> Is it legit to access conn->client->fd ? It seems there ought to be an
> ap_function instead, unless my approach is wrong and there's a better way
> to solve my problem.
> 
> --
> Eric Cholet

-- 
----------------------------------------------------------------------------
 /~\     /~\            CASTLE INDUSTRIES PTY. LTD.
 | |_____| |            Incorporated 1969. in N.S.W., Australia
 |         |            Phone +612 6567 1227 Fax +612 6567 1449
 |   /~\   |            Web http://www.midcoast.com.au/~mvoase
 |   [ ]   |            Michael H. Voase.  Director.
~~~~~~~~~~~~~~          Castle Industries - Industrial Strength
Solutions.
----------------------------------------------------------------------------

Mime
View raw message