X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2Fclient.pl;h=c5b4bbec805e2ef04a8ae01c081286e1b5eb46b1;hp=c3efad349185290ce4161c976d8bffef90ce27fc;hb=07ea293f3919d2da76220b5fbc55b734008ed44c;hpb=b2e4d1c7378cfd98bd8cdf9304c2bd6e5d4b802c diff --git a/perl/client.pl b/perl/client.pl index c3efad34..c5b4bbec 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -118,7 +118,7 @@ $call = uc shift @ARGV; $call = uc $mycall if !$call; $connsort = lc shift @ARGV; $connsort = 'local' if !$connsort; -$mode = ($connsort =~ /^ax/) ? 1 : 2; +$mode = ($connsort =~ /^ax/o) ? 1 : 2; setmode(); #select STDOUT; $| = 1; @@ -131,5 +131,16 @@ $SIG{'HUP'} = \&sig_term; $conn = Msg->connect("$clusteraddr", $clusterport, \&rec_socket); $conn->send_now("A$call|$connsort"); Msg->set_event_handler(\*STDIN, "read" => \&rec_stdin); -Msg->event_loop(); + +$lasttime = time; +for (;;) { + my $t; + Msg->event_loop(1, 0.010); + $t = time; + if (t > $lasttime+660 && $connsort =~ /^ax/o) { # every e + print pack('xx'); + STDOUT->fflush(); + $lasttime = $t; + } +}