httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Cholet <cho...@logilune.com>
Subject RE: Using conn->client->fd
Date Mon, 04 Oct 1999 07:33:30 GMT
Michel,

Thanks for the suggestion. However I want to detect client disconnection 
when I'm not doing any i/o to it, so I don't think it will work for me.

--
Eric


On Sunday, October 03, 1999 1:18 PM, Michael H. Voase 
[SMTP:mvoase@midcoast.com.au] wrote:
> 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