Network\Socket::on_disconnect PHP Method

on_disconnect() public method

Registers a new handle for disconnections.
public on_disconnect ( callable $function ) : object
$function callable Function to call on connect.
return object
    public function on_disconnect($function)
    {
        return xp_signal(new SIG_Disconnect($this), $function);
    }