use Msg;
use DXVars;
use DXDebug;
-use DXUser;
use IO::File;
use IO::Socket;
use IPC::Open2;
$line =~ s/\n/\r/og if $mode == 1;
#my $p = qq($line$snl);
if ($buffered) {
- if (length $outqueue >= 128) {
+ if (length $outqueue >= $client_buffer_lth) {
print $stdout $outqueue;
$outqueue = "";
}
$mode = 2; # 1 - \n = \r as EOL, 2 - \n = \n, 0 - transparent
$call = ""; # the callsign being used
-@stdoutq = (); # the queue of stuff to send out to the user
$conn = 0; # the connection object for the cluster
$lastbit = ""; # the last bit of an incomplete input line
$mynl = "\n"; # standard terminator
$lasttime = time; # lasttime something happened on the interface
-$outqueue = ""; # the output queue length
+$outqueue = ""; # the output queue
+$client_buffer_lth = 200; # how many characters are buffered up on outqueue
$buffered = 1; # buffer output
$savenl = ""; # an NL that has been saved from last time
$timeout = 60; # default timeout for connects
$rfh = 0;
$wfh = 0;
+$waitedpid = 0;
#
# deal with args
$SIG{'TERM'} = \&sig_term;
$SIG{'HUP'} = 'IGNORE';
$SIG{'CHLD'} = \&sig_chld;
+$SIG{'ALRM'} = \&timeout;
dbgadd('connect');
close(I);
$issue = s/\n/\r/og if $mode == 1;
local $/ = $nl;
- $stdout->print($issue) if issue;
+ $stdout->print($issue) if $issue;
}
+ use DXUser;
+
DXUser->init($userfn);
# allow a login from an existing user. I could create a user but
open(IN, "$cpath/$mcall") or cease(2);
@in = <IN>;
close IN;
-
+
alarm($timeout);
for (@in) {
# close W;
$stdin = $rfh;
$stdout = $wfh;
- $csort = 'telnet' if $sort eq 'prog';
+ $csort = 'telnet' if $csort eq 'prog';
} elsif ($csort eq 'telnet') {
# open(STDIN, "<&$sock");
# open(STDOUT, ">&$sock");