2 # This class is the internal subclass that deals with the internal port 27754
3 # communications for Msg.pm
7 # Copyright (c) 2001 - Dirk Koopman G1TLH
21 my ($conn, $msg) = @_;
22 $msg =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
23 push (@{$conn->{outqueue}}, $msg . "\n");
30 if ($conn->{msg} =~ /\n/) {
31 my @lines = split /\r?\n/, $conn->{msg};
32 if ($conn->{msg} =~ /\n$/) {
35 $conn->{msg} = pop @lines;
39 s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
40 s/[\x00-\x08\x0a-\x19\x1b-\x1f\x80-\x9f]/./g; # immutable CSI sequence + control characters
44 &{$conn->{rproc}}($conn, $_);