X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fwsjtl.pl;fp=perl%2Fwsjtl.pl;h=e6f1c0482f0cbe65d8495f4cf16996e8d7946e33;hb=b9241950296fe353177143eb3cdb02de6f9929f2;hp=2fabfe9ed95cb335a514a466a43a283124134306;hpb=26a25e640fb1b9c7806988cc949b557116c278bd;p=spider.git diff --git a/perl/wsjtl.pl b/perl/wsjtl.pl index 2fabfe9e..e6f1c048 100644 --- a/perl/wsjtl.pl +++ b/perl/wsjtl.pl @@ -71,7 +71,7 @@ use DXUDP; use WSJTX; our $udp_host = '0.0.0.0'; -our $udp_port = 2237; +our $udp_port = 59387; # 2237; our $tcp_host = '::'; our $tcp_port = 2238; @@ -89,11 +89,25 @@ dbgadd('udp'); $uh = DXUDP->new; $uh->start(host => $udp_host, port => $udp_port) or die "Cannot listen on $udp_host:$udp_port $!\n"; -$wsjtx = WSJTX->new(); -$uh->on(read => sub {wstjx->handle(@_)}); +$wsjtx = WSJTX->new; +$uh->on(read => \&_read); Mojo::IOLoop->start() unless Mojo::IOLoop->is_running; +sub _read +{ + my ($handle, $data) = @_; + +# say "before handle"; + + $wsjtx->handle($handle, $data); + +# say "after handle"; + +# my $lth = length $data; +# dbgdump('udp', "UDP IN lth: $lth", $data); +} + exit;