> -Original Message-
> From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 14, 2001 3:21 PM
> To: Mod Perl
> Subject: Updating $r->connection->aborted before $r->print() ?
>
>
> Hey,
>
> In my own experience it seems that I can only get
> $r->connection->aborted u
Geoffrey Young wrote:
>
>>-Original Message-
>>From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, September 14, 2001 3:21 PM
>>To: Mod Perl
>>Subject: Updating $r->connection->aborted before $r->print() ?
>>
>>
>>Hey,
>>
>>In my own experience it seems that I can only get
>>$r
>> my $fileno = $r->connection->fileno;
>>
>> $s = IO::Select->new($fileno);
>>
>> die "aborted" if grep { m/$fileno/ } $s->can_read(1);
>
>
>Hmm, does this actually work Geoff? What happens if mod_perl is running
>as a back-end? In this case $r->connection->aborted
On Sat, 15 Sep 2001, Geoffrey Young wrote:
> >> my $fileno = $r->connection->fileno;
> >> $s = IO::Select->new($fileno);
> >>
> >> die "aborted" if grep { m/$fileno/ } $s->can_read(1);
>
> >Hmm, does this actually work Geoff? What happens if mod_perl is running
> >as a back-end? In this case $r->
Geoffrey Young wrote:
>
> my $fileno = $r->connection->fileno;
>
> $s = IO::Select->new($fileno);
>
> die "aborted" if grep { m/$fileno/ } $s->can_read(1);
>
> HTH
>
Thanks for this. The code that I ended up using for Apache::ASP was:
# IsClientConnected ? Might already be disconnecte
Geoffrey Young wrote:
>
> yes, it worked for me. actually, I guess I should have been clearer - this
> has nothing to do with $c->aborted or $r->print (well, on the outside
> anyway). for $c->aborted you have to wait for Apache to flush the print
> buffers. actually, in my tests $r->rflush didn
>Hey Geoff, for efficiency, my final code for detecting a client abort
>is:
[snip]
>where $self is the ASP object ... I looked at the IO::Select->new()
>and it looked pretty hairy, so I checked connection->aborted
>status first in case it was already set.
good idea. thanks for following up...