Fugu
view release on metacpan or search on metacpan
lib/Fugu/Mdnsd.pm view on Meta::CPAN
}
# $self->update_txt(%args):
# txt => $string replacement TXT string
# timeout => $secs overrides the object default
# Re-advertise with a new TXT record. Same-socket replacement
# does not work [MDNS-Control §8]. Thus the method withdraws and
# republishes over a fresh connection. It reuses the service
# parameters from publish_service. While unpublished, it is a
# no-op that returns 1. This mirrors the old mdnsctl wrapper.
sub update_txt ( $self, %args )
{
return 1 unless $self->{published};
my $txt = $args{txt} // '';
if ( length($txt) > TXT_MAX ) {
$self->{error} = 'txt too long';
return;
}
$self->withdraw;
( run in 0.372 second using v1.01-cache-2.11-cpan-4ef0a570458 )