projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added offest to outgoing ping times
[spider.git]
/
perl
/
DXChannel.pm
diff --git
a/perl/DXChannel.pm
b/perl/DXChannel.pm
index eafa76ad527083212ee0d8a31c12485e23f01dc4..9f7b8d180fefec8ce6f9184b0bbc122b5fc9bbc6 100644
(file)
--- a/
perl/DXChannel.pm
+++ b/
perl/DXChannel.pm
@@
-78,6
+78,11
@@
use vars qw(%channels %valid);
inwwvfilter => '5,Input WWV Filter',
inspotfilter => '5,Input Spot Filter',
passwd => '9,Passwd List,parray',
inwwvfilter => '5,Input WWV Filter',
inspotfilter => '5,Input Spot Filter',
passwd => '9,Passwd List,parray',
+ pingint => '9,Ping Interval ',
+ nopings => '9,Ping Obs Count',
+ lastping => '9,Ping last sent,atime',
+ pingtime => '9,Ping totaltime,parray',
+ pingave => '0,Ping ave time',
);
# object destruction
);
# object destruction
@@
-169,7
+174,7
@@
sub del
sub is_bbs
{
my $self = shift;
sub is_bbs
{
my $self = shift;
- return $self->{
sort
} eq 'B';
+ return $self->{
'sort'
} eq 'B';
}
# is it an ak1a cluster ?
}
# is it an ak1a cluster ?
@@
-193,19
+198,30
@@
sub is_connect
return $self->{'sort'} eq 'C';
}
return $self->{'sort'} eq 'C';
}
+# for perl 5.004's benefit
+sub sort
+{
+ my $self = shift;
+ return @_ ? $self->{'sort'} = shift : $self->{'sort'} ;
+}
+
# handle out going messages, immediately without waiting for the select to drop
# this could, in theory, block
sub send_now
{
my $self = shift;
my $conn = $self->{conn};
# handle out going messages, immediately without waiting for the select to drop
# this could, in theory, block
sub send_now
{
my $self = shift;
my $conn = $self->{conn};
+ return unless $conn;
my $sort = shift;
my $call = $self->{call};
for (@_) {
chomp;
my $sort = shift;
my $call = $self->{call};
for (@_) {
chomp;
- $conn->send_now("$sort$call|$_") if $conn;
- dbg('chan', "-> $sort $call $_") if $conn;
+ my @lines = split /\n/;
+ for (@lines) {
+ $conn->send_now("$sort$call|$_");
+ dbg('chan', "-> $sort $call $_");
+ }
}
$self->{t} = time;
}
}
$self->{t} = time;
}
@@
-217,12
+233,16
@@
sub send # this is always later and always data
{
my $self = shift;
my $conn = $self->{conn};
{
my $self = shift;
my $conn = $self->{conn};
+ return unless $conn;
my $call = $self->{call};
for (@_) {
chomp;
my $call = $self->{call};
for (@_) {
chomp;
- $conn->send_later("D$call|$_") if $conn;
- dbg('chan', "-> D $call $_") if $conn;
+ my @lines = split /\n/;
+ for (@lines) {
+ $conn->send_later("D$call|$_");
+ dbg('chan', "-> D $call $_");
+ }
}
$self->{t} = time;
}
}
$self->{t} = time;
}