Apache2::ASP::Mock::ClientSocket - Mimics the APR::Socket object


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

Index


Code Index:

NAME

Top

Apache2::ASP::Mock::ClientSocket - Mimics the APR::Socket object

SYNOPSIS

Top

  my $socket = $Response->context->connection->client_socket;
  $socket->close();

DESCRIPTION

Top

This package mimics the APR::Socket object in a normal mod_perl2 environment, and is used by Apace2::ASP::API.

PUBLIC METHODS

Top

close( )

Pretends to close the current connection.

BUGS

Top

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

HOMEPAGE

Top

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.

AUTHOR

Top

John Drago <jdrago_999@yahoo.com>

COPYRIGHT

Top

LICENSE

Top

This software is Free software and is licensed under the same terms as perl itself.


Apache2-ASP documentation Contained in the Apache2-ASP distribution.

package Apache2::ASP::Mock::ClientSocket;

use strict;
use warnings 'all';
use Scalar::Util 'weaken';


#==============================================================================
sub new
{
  my ($class, %args) = @_;
  
  my $s = bless \%args, $class;
  
  weaken($s->{connection});
  return $s;
}# end new()


#==============================================================================
sub close
{
  my $s = shift;
  
  $s->{connection}->aborted( 1 );
}# end close()

1;# return true: