SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

Net::HTTP::NB

Section: User Contributed Perl Documentation (3)
Updated: 2018-05-09
Index 

NAME

Net::HTTP::NB - Non-blocking HTTP client 

VERSION

version 6.18 

SYNOPSIS

 use Net::HTTP::NB; my $s = Net::HTTP::NB->new(Host => "www.perl.com") || die $@; $s->write_request(GET => "/"); use IO::Select; my $sel = IO::Select->new($s); READ_HEADER: {    die "Header timeout" unless $sel->can_read(10);    my($code, $mess, %h) = $s->read_response_headers;    redo READ_HEADER unless $code; } while (1) {    die "Body timeout" unless $sel->can_read(10);    my $buf;    my $n = $s->read_entity_body($buf, 1024);    last unless $n;    print $buf; }
 

DESCRIPTION

Same interface as "Net::HTTP" but it will never try multiple readswhen the read_response_headers() or read_entity_body() methods areinvoked. This make it possible to multiplex multiple Net::HTTP::NBusing select without risk blocking.

If read_response_headers() did not see enough data to complete theheaders an empty list is returned.

If read_entity_body() did not see new entity data in its readthe value -1 is returned. 

SEE ALSO

Net::HTTP 

AUTHOR

Gisle Aas <gisleAATTactivestate.com> 

COPYRIGHT AND LICENSE

This software is copyright (c) 2001-2017 by Gisle Aas.

This is free software; you can redistribute it and/or modify it underthe same terms as the Perl 5 programming language system itself.


 

Index

NAME
VERSION
SYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR
COPYRIGHT AND LICENSE

This document was created byman2html,using the manual pages.