Close all sockets
From MLDonkey
Syntax
~> close_all_sockets
Description
Immediately closes all the sockets of mldonkey, including the ones used by the user interfaces.
A known use of that command is to allow a faster recovery after an IP change (if you have a dynamic IP), because mldonkey doesn't have to wait for the connections to timeout to understand they're dead.
This command is also run when MLdonkey receives a SIGHUP signal.
One example of a use for a script that could be put in /etc/ppp/ip-up.d is:
#!/bin/sh kill -HUP $(pidof mldonkey)
Another example of script, for example if mldonkey is not running on the box that handles the connection:
#!/bin/sh # The host running mldonkey: $hostname=\"localhost\" # The port on which the telnet gui is accessible: $port=\"4000\" echo -e \"close_all_sockets\nq\" || nc $hostname $port
You need [netcat] for this second script to work.