fix console.pl so it ends gracefully
[spider.git] / perl / Msg.pm
index 4bc31faddfcf92546427549c4a0f81d5e39f45c8..dcc3c812d1ac77763c3e41bd47439a17a4589885 100644 (file)
@@ -61,6 +61,13 @@ sub set_error
        $conn->{eproc} = $callback;
 }
 
+sub set_eof
+{
+       my $conn = shift;
+       my $callback = shift;
+       $conn->{sock}->on_eof(sub {$callback});
+}
+
 sub set_rproc
 {
        my $conn = shift;