SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 6.X perl-ParallelUserAgent-2.43-6.i386.rpm

lib::LWP::Parallel::Protocol

Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index 

NAME

LWP::Parallel::Protocol - Base class for parallel LWP protocols 

SYNOPSIS

 package LWP::Parallel::Protocol::foo; require LWP::Parallel::Protocol; @ISA=qw(LWP::Parallel::Protocol);
 

DESCRIPTION

This class is used a the base class for all protocol implementationssupported by the LWP::Parallel library. It mirrors the behavior of theoriginal LWP::Parallel library by subclassing from it and adding a fewsubroutines of its own.

Please see the LWP::Protocol for more information about the usage ofthis module.

In addition to the inherited methods from LWP::Protocol, The following methods and functions are provided: 

ADDITIONAL METHODS AND FUNCTIONS


$prot = new HTTP::Protocol;
The LWP::Protocol constructor is inherited by subclasses. As this is avirtual base class this method should not be called directly.
$prot = LWP::Parallel::Protocol::create($url)
Create an object of the class implementing the protocol to handle thegiven scheme. This is a function, not a method. It is more an objectfactory than a constructor. This is the function user agents shoulduse to access protocols.
$class = LWP::Parallel::Protocol::implementor($scheme, [$class])
Get and/or set implementor class for a scheme. Returns `' if thespecified scheme is not supported.
$prot->receive ($arg, $response, $content)
Called to store a piece of content of a request, and process itappropriately into a scalar, file, or by calling a callback. If $argis undefined, then the content is stored within the $response. If$arg is a simple scalar, then $arg is interpreted as a file name andthe content is written to this file. If $arg is a reference to aroutine, then content is passed to this routine.

$content must be a reference to a scalar holding the content thatshould be processed.

The return value from receive() is the $response object reference.

Note: We will only use the file or callback argument if$response->is_success(). This avoids sendig content data forredirects and authentization responses to the file or the callbackfunction.

$prot->receive_once($arg, $response, $content, $entry)
Can be called when the whole response content is available as$content. This will invoke receive() with a collector callback thatreturns a reference to $content the first time and an empty string thenext.
 

SEE ALSO

Inspect the LWP/Parallel/Protocol/http.pm file for examples of usage. 

COPYRIGHT

Copyright 1997,1998 Marc Langheinrich.

This library is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.


 

Index

NAME
SYNOPSIS
DESCRIPTION
ADDITIONAL METHODS AND FUNCTIONS
SEE ALSO
COPYRIGHT

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector