HTTP::Async 0.05
Sponsored Links
HTTP::Async 0.05 Ranking & Summary
File size:
0.015 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1013
Date added:
2007-01-17
Publisher:
Edmund von der Burg
HTTP::Async 0.05 description
HTTP::Async is a Perl module that can process multiple HTTP requests in parallel without blocking.
SYNOPSIS
Create an object and add some requests to it:
use HTTP::Async;
my $async = HTTP::Async->new;
# create some requests and add them to the queue.
$async->add( HTTP::Request->new( GET => http://www.perl.org/ ) );
$async->add( HTTP::Request->new( GET => http://www.ecclestoad.co.uk/ ) );
and then EITHER process the responses as they come back:
while ( my $response = $async->wait_for_next_response ) {
# Do some processing with $response
}
OR do something else if there is no response ready:
while ( $async->not_empty ) {
if ( my $response = $async->next_response ) {
# deal with $response
} else {
# do something else
{
}
OR just use the async object to fetch stuff in the background and deal with the responses at the end.
# Do some long code...
for ( 1 .. 100 ) {
some_function();
$async->poke; # lets it check for incoming data.
}
while ( my $response = $async->wait_for_next_response ) {
# Do some processing with $response
}
Although using the conventional LWP::UserAgent is fast and easy it does have some drawbacks - the code execution blocks until the request has been completed and it is only possible to process one request at a time. HTTP::Async attempts to address these limitations.
It gives you a Async object that you can add requests to, and then get the requests off as they finish. The actual sending and receiving of the requests is abstracted. As soon as you add a request it is transmitted, if there are too many requests in progress at the moment they are queued. There is no concept of starting or stopping - it runs continuously.
Whilst it is waiting to receive data it returns control to the code that called it meaning that you can carry out processing whilst fetching data from the network. All without forking or threading - it is actually done using select lists.
SYNOPSIS
Create an object and add some requests to it:
use HTTP::Async;
my $async = HTTP::Async->new;
# create some requests and add them to the queue.
$async->add( HTTP::Request->new( GET => http://www.perl.org/ ) );
$async->add( HTTP::Request->new( GET => http://www.ecclestoad.co.uk/ ) );
and then EITHER process the responses as they come back:
while ( my $response = $async->wait_for_next_response ) {
# Do some processing with $response
}
OR do something else if there is no response ready:
while ( $async->not_empty ) {
if ( my $response = $async->next_response ) {
# deal with $response
} else {
# do something else
{
}
OR just use the async object to fetch stuff in the background and deal with the responses at the end.
# Do some long code...
for ( 1 .. 100 ) {
some_function();
$async->poke; # lets it check for incoming data.
}
while ( my $response = $async->wait_for_next_response ) {
# Do some processing with $response
}
Although using the conventional LWP::UserAgent is fast and easy it does have some drawbacks - the code execution blocks until the request has been completed and it is only possible to process one request at a time. HTTP::Async attempts to address these limitations.
It gives you a Async object that you can add requests to, and then get the requests off as they finish. The actual sending and receiving of the requests is abstracted. As soon as you add a request it is transmitted, if there are too many requests in progress at the moment they are queued. There is no concept of starting or stopping - it runs continuously.
Whilst it is waiting to receive data it returns control to the code that called it meaning that you can carry out processing whilst fetching data from the network. All without forking or threading - it is actually done using select lists.
HTTP::Async 0.05 Screenshot
HTTP::Async 0.05 Keywords
HTTP
Async 0.05
Perl module
in parallel
http requests
requests
response
process
Perl
parallel
blocking
HTTP::Async
HTTPAsync
HTTP::Async 0.05
Libraries
Programming
Bookmark HTTP::Async 0.05
HTTP::Async 0.05 Copyright
WareSeeker periodically updates pricing and software information of HTTP::Async 0.05 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of HTTP::Async 0.05 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
response auto insurance
requests since tuesday
prayer requests
first response
requests since monday
response link
response to intervention
requests for proposals
response time
american medical response
earmark requests candidates
search http
requests video
online prayer requests
response trigger
what is response to intervention
perl modules
resistors in parallel
Related Software
HTTP::Handle is a HTTP Class designed for streaming. Free Download
HTTPManifold is an application for tunnelling Web/HTTP traffic for multiple servers through a single IP address. Free Download
HappyHTTP is a simple C++ library for issuing HTTP requests and processing responses. Free Download
httping is a ping-like tool for HTTP requests. Free Download
Template::Ast is a Perl module to process ASTs for Perl Template Toolkit. Free Download
HTTP::WebTest is a Perl module for testing static and dynamic web content. Free Download
HTTP::BrowserDetect is a Perl module to determine the Web browser, version, and platform from an HTTP user agent string. Free Download
Pod::HTML_Elements is a Perl module to convert POD to tree of LWPs HTML::Element and hence HTML or PostScript. Free Download
Latest Software
Popular Software
Favourite Software