redhat man page for net::http::nb

Query: net::http::nb

OS: redhat

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

Net::HTTP::NB(3)					User Contributed Perl Documentation					  Net::HTTP::NB(3)

NAME
Net::HTTP::NB - Non-blocking HTTP client
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 reads when the read_response_headers() or read_entity_body() methods are invoked. This make it possible to multiplex multiple Net::HTTP::NB using select without risk blocking. If read_response_headers() did not see enough data to complete the headers an empty list is returned. If read_entity_body() did not see new entity data in its read the value -1 is returned.
SEE ALSO
Net::HTTP
COPYRIGHT
Copyright 2001 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. libwww-perl-5.65 2001-08-27 Net::HTTP::NB(3)
Related Man Pages
net::http::nb(3) - mojave
net::http(3) - suse
net::http::nb5.18(3) - mojave
net::http::nb(3) - suse
net::http5.18(3) - mojave
Similar Topics in the Unix Linux Community
GNU libmicrohttpd 0.3.0 (Default branch)
Shttp 0.0.9 (Default branch)
GNU libmicrohttpd 0.4.0pre0 (Default branch)
unable to get end of file while reading HTTP data from socket
HTTP extension for PHP 1.6.3 (Default branch)