YanoRyuichi.com/
Wiki
Blog
GitHub
Sandbox
開始行:
* AnyEvent-HTTP [#da15f147]
#!/usr/bin/env perl
use strict;
use warnings;
use AnyEvent::HTTP;
my $cv = AnyEvent->condvar;
sub done {
print $_[1]->{server}, "\n";
$cv->end;
}
my @url = ("http://www.microsoft.com/","http://www.apple...
$cv->begin; http_get($url[0], \&done);
$cv->begin; http_get($url[1], \&done);
$cv->begin; http_get($url[2], \&done);
$cv->recv;
Apache/2.2.3 (Oracle)
gws
Microsoft-IIS/7.5
** 参考 [#dc7ff4c9]
http://search.cpan.org/dist/AnyEvent-HTTP/
終了行:
* AnyEvent-HTTP [#da15f147]
#!/usr/bin/env perl
use strict;
use warnings;
use AnyEvent::HTTP;
my $cv = AnyEvent->condvar;
sub done {
print $_[1]->{server}, "\n";
$cv->end;
}
my @url = ("http://www.microsoft.com/","http://www.apple...
$cv->begin; http_get($url[0], \&done);
$cv->begin; http_get($url[1], \&done);
$cv->begin; http_get($url[2], \&done);
$cv->recv;
Apache/2.2.3 (Oracle)
gws
Microsoft-IIS/7.5
** 参考 [#dc7ff4c9]
http://search.cpan.org/dist/AnyEvent-HTTP/
ページ名: