… | |
… | |
12 | s/\015?\012$//; |
12 | s/\015?\012$//; |
13 | chomp; |
13 | chomp; |
14 | if (/^q/) { |
14 | if (/^q/) { |
15 | Event::unloop; |
15 | Event::unloop; |
16 | } elsif (/^i/) { |
16 | } elsif (/^i/) { |
17 | my @conn; |
17 | my @data; |
18 | push @conn, values %$_ for values %conn::conn; |
|
|
19 | for (values %conn::conn) { |
18 | for (values %conn::conn) { |
20 | for (values %$_) { |
19 | for (values %$_) { |
21 | next unless $_; |
20 | next unless $_; |
22 | print $fh "$_: $_->{remote_addr} $_->{uri}\n"; |
21 | push @data, "$_: $_->{remote_addr} $_->{uri}\n"; |
23 | } |
22 | } |
24 | } |
23 | } |
|
|
24 | print $fh sort @data; |
|
|
25 | print $fh scalar@data, " connections\n";#d# |
25 | } elsif (/^r/) { |
26 | } elsif (/^r/) { |
26 | $::RESTART = 1; |
27 | $::RESTART = 1; |
27 | unloop; |
28 | unloop; |
28 | print $fh "bye bye.\n"; |
29 | print $fh "bye bye.\n"; |
29 | last; |
30 | last; |