AC-Yenta
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AC/Yenta/Kibitz/Status.pm view on Meta::CPAN
return ACPYentaStatusReply->encode({
status => \@peer,
});
}
################################################################
# do not believe a client that says it is up
# put it on the sceptical queue, and check for ourself
sub update_sceptical {
my $gpb = shift;
my $io = shift;
return unless $gpb;
my $c;
eval {
$c = ACPYentaStatusRequest->decode( $gpb );
$c = $c->{myself};
};
if(my $e = $@){
lib/AC/Yenta/NetMon.pm view on Meta::CPAN
sub init {
my $natinfo = my_network_info();
for my $n ( @$natinfo ){
my $dom = $n->{natdom} || 'public';
$natdom{ $n->{ipa} } = $dom;
$lastok{ $dom } = $^T; # assume everything is working
}
}
sub update {
my $io = shift;
my $ip = inet_ntoa( (sockaddr_in(getsockname($io->{fd})))[1] );
my $dom = $natdom{ $ip } || 'public';
$lastok{$dom} = $^T;
}
sub status_dom {
my $dom = shift;
lib/AC/Yenta/Status.pm view on Meta::CPAN
my $id = shift;
my $up = shift;
# if( $up->{environment} ne conf_value('environment') ){
# verbose("ignoring update from $id - wrong env: $up->{environment}");
# return;
# }
return 1;
}
sub update_sceptical {
my $class = shift;
my $id = shift; # ->server_id
my $up = shift;
my $io = shift;
return unless $class->_env_ok($id, $up);
if( $DATA->{allpeer}{$id} ){
# already known
delete $DATA->{sceptical}{$id};
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.538 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )