From: Dobrica Pavlinusic Date: Mon, 5 Oct 2020 14:59:40 +0000 (+0200) Subject: configurable interval X-Git-Url: http://git.rot13.org/?p=zc;a=commitdiff_plain;h=a76fc1a0757a168e8e26c9bae42319d4de862791 configurable interval --- diff --git a/zc-send b/zc-send index a048c7f..4287368 100755 --- a/zc-send +++ b/zc-send @@ -23,11 +23,14 @@ if ( $path =~ m{$queue/(\w+)/} ) { my $raw; -if ( $ARGV[0] eq m/interval/ ) { +if ( $ARGV[0] =~ m/interval/ ) { # heartbeat interval - $raw = write_parameter_frame( "\x21" => "\x04" . pack('l',60) ); + my $interval = $ARGV[1] || 300; + print "set heartbeat interval to $interval s\n"; + $raw = write_parameter_frame( "\x21" => "\x04" . pack('l',$interval) ); -} else { +} else { + print "read_parameter_frame\n"; $raw = read_parameter_frame( "\x00" => "\x04\xe8\x03\x00\x00", "\x21", "\x44",