摘要:
还是在不断的改写做尝试。做了些小记录把。方便以后翻。。#!/usr/bin/perluse Coro;use AnyEvent::Socket;use AnyEvent::Ping::TCP;my @check_list;my @target=;foreach my $ip (@target){ foreach my $port (1..65535){ push @check_list,async{ $a=tcp_connect $ip => $port, sub { my $fh = shift ... 阅读全文
posted @ 2013-10-10 10:24
墨迹哥's
阅读(394)
评论(0)
推荐(0)
摘要:
坑爹的Coro。。想要用协程比较坑爹,还要自己改写。瞬间就疯了。。没办法的情况下,研究了下它的模块代码,具体如下:sub tcp_ping_syn { my $host = shift; my $port = shift; my $timeout = shift || 5; if ((++$PingQueue{$host}{$port}{Requests}) > 1) { # Ping already underway... return; } my $cv = AnyEvent->condvar; my $... 阅读全文
posted @ 2013-10-10 09:46
墨迹哥's
阅读(419)
评论(0)
推荐(0)

浙公网安备 33010602011771号