merge various things from master
[spider.git] / perl / AsyncMsg.pm
index cb1c2f2bdc64a228f6b5c76bd6d3fcc8c047b800..f8cd2f9f3b60bea14be79d24029a69049b685a9c 100644 (file)
@@ -277,6 +277,19 @@ sub disconnect
        $conn->SUPER::disconnect;
 }
 
+sub _send_later
+{
+       my $conn = shift;
+       my $m = shift;
+       
+       if (isdbg('async')) {
+               my $s = $m;
+               $s =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
+               dbg("AsyncMsg: send $s");
+       }
+       $conn->send_later($m);
+}
+
 sub DESTROY
 {
        my $conn = shift;