add more debuging,
[spider.git] / perl / Msg.pm
index d1f2589b0aabb58d96af1d44a7b6f6b51d459bdf..f1f60edfb6f845e5e04604a41c1a49785380a33f 100644 (file)
@@ -272,7 +272,10 @@ sub _send {
                                        $conn->disconnect;
                     return 0; # fail. Message remains in queue ..
                 }
-            }
+            } elsif (isdbg('raw')) {
+                               my $call = $conn->{call} || 'none';
+                               dbgdump('raw', "$call send $bytes_written: ", $msg);
+                       }
             $offset         += $bytes_written;
             $bytes_to_write -= $bytes_written;
         }
@@ -374,6 +377,10 @@ sub _rcv {                     # Complement to _send
        if (defined ($bytes_read)) {
                if ($bytes_read > 0) {
                        $conn->{msg} .= $msg;
+                       if (isdbg('raw')) {
+                               my $call = $conn->{call} || 'none';
+                               dbgdump('raw', "$call read $bytes_read: ", $msg);
+                       }
                } 
        } else {
                if (_err_will_block($!)) {