X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FMsg.pm;h=9df7640ecbbfbfecd5a80493469a5abacb1700f5;hb=3b52d4a1eb273c6e6eff14223baf69c0a309899c;hp=aaa38b533b47397ac40193c82fe771872e52d7d7;hpb=3ba4a53a0fae7b6135ee9b8cd0ab4bbe352b4bdc;p=spider.git diff --git a/perl/Msg.pm b/perl/Msg.pm index aaa38b53..9df7640e 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -166,6 +166,7 @@ sub set_blocking { fcntl ($_[0], F_SETFL(), $flags); } } + sub handle_send_err { # For more meaningful handling of send errors, subclass Msg and # rebless $conn. @@ -278,6 +279,13 @@ sub _new_client { } } +sub close_server +{ + set_event_handler ($main_socket, "read" => undef); + $main_socket->close; + $main_socket = 0; +} + #---------------------------------------------------- # Event loop routines used by both client and server