connect => [$to_host, $to_port],
-# on_connect => sub {my $h = shift; $conn->{peerhost} = $h->handle->peername;},
+ on_connect => sub {my $h = shift; $conn->{peerhost} = shift;},
on_eof => sub {$conn->disconnect},
dbg("Msg::set_event_handler called from ${pkg}::${fn} line $line doing $s");
}
+sub echo
+{
+ my $conn = shift;
+ return defined $_[0] ? $conn->{echo} = $_[0] : $_[0];
+}
+
sub DESTROY
{
my $conn = shift;