perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cho...@hyperreal.org
Subject cvs commit: modperl/Apache Apache.pm
Date Wed, 06 Oct 1999 17:43:46 GMT
cholet      99/10/06 10:43:45

  Modified:    .        Changes
               src/modules/perl Connection.xs
               Apache   Apache.pm
  Log:
  add $r->connection->fileno
  
  Revision  Changes    Path
  1.349     +4 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.348
  retrieving revision 1.349
  diff -u -r1.348 -r1.349
  --- Changes	1999/09/22 16:24:40	1.348
  +++ Changes	1999/10/06 17:43:35	1.349
  @@ -10,6 +10,10 @@
   
   =item 1.21_01-dev
   
  +add $r->connection->fileno, provides the client file descriptors. This
  +can be used to detect client disconnect without doing any I/O, e.g. using
  +IO::Select [Eric Cholet <cholet@logilune.com>]
  +
   if $r->bytes_sent has not been calculated, then do so before returning
   the value.  thanks to Dirk Melchers for the spot
   
  
  
  
  1.6       +16 -0     modperl/src/modules/perl/Connection.xs
  
  Index: Connection.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Connection.xs,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Connection.xs	1999/09/09 09:40:31	1.5
  +++ Connection.xs	1999/10/06 17:43:41	1.6
  @@ -33,6 +33,22 @@
   #				 * get_remote_host() */
   
   int
  +fileno(conn, ...)
  +    Apache::Connection	conn
  +
  +    PREINIT:
  +    int sts = 1;	/* default is output fd */
  +
  +    CODE:
  +    if(items > 1) {
  +        sts = (int)SvIV(ST(1));
  +    }
  +    RETVAL = ap_bfileno(conn->client, sts ? B_WR : B_RD);
  +
  +    OUTPUT:
  +    RETVAL
  +
  +int
   aborted(conn)
       Apache::Connection	conn
   
  
  
  
  1.31      +9 -0      modperl/Apache/Apache.pm
  
  Index: Apache.pm
  ===================================================================
  RCS file: /export/home/cvs/modperl/Apache/Apache.pm,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Apache.pm	1999/09/02 20:19:21	1.30
  +++ Apache.pm	1999/10/06 17:43:43	1.31
  @@ -531,6 +531,15 @@
   
   Returns true if the client stopped talking to us.
   
  +=item $c->fileno( [$direction] )
  +
  +Returns the client file descriptor. If $direction is 0, the input fd
  +is returned. If $direction is not null or ommitted, the output fd is
  +returned.
  +
  +This can be used to detect client disconnect without doing any I/O,
  +e.g. using IO::Select.
  +
   =back
   
   =back
  
  
  

Mime
View raw message