GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LWP::PARALLEL::PROTOCOL (3)

.ds Aq ’

NAME

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

CONTENTS

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 implementations supported by the LWP::Parallel library. It mirrors the behavior of the original LWP::Parallel library by subclassing from it and adding a few subroutines of its own.

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

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

ADDITIONAL METHODS AND FUNCTIONS

$prot = LWP::Parallel::Protocol->new(); The LWP::Parallel::Protocol constructor is inherited by subclasses. As this is a virtual base class this method should <B>notB> be called directly.

Note: This is inherited from LWP::Protocol

$prot = LWP::Parallel::Protocol::create($schema) Create an object of the class implementing the protocol to handle the given scheme. This is a function, not a method. It is more an object factory than a constructor. This is the function user agents should use to access protocols.
$class = LWP::Parallel::Protocol::implementor($scheme, [$class]) Get and/or set implementor class for a scheme. Returns ’’ if the specified scheme is not supported.
$prot->receive ($arg, $response, $content) Called to store a piece of content of a request, and process it appropriately into a scalar, file, or by calling a callback. If $arg is undefined, then the content is stored within the $response. If $arg is a simple scalar, then $arg is interpreted as a file name and the content is written to this file. If $arg is a reference to a routine, then content is passed to this routine.

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

The return value from receive() is undef for errors, positive for non-zero content processed, 0 for forced EOFs, and potentially a negative command from a user-defined callback function.

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

$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 that returns a reference to $content the first time and an empty string the next.

SEE ALSO

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

COPYRIGHT

Copyright 1997-2004 Marc Langheinrich <marclang@cpan.org> Parts copyright 1995-2004 Gisle Aas

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

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 291: You forgot a ’=back’ before ’=head1’
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LWP::PARALLEL::PROTOCOL (3) 2004-02-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.