public void stop()
	{
		connected = false;
		shutdown=true;
		try { if(input!=null) input.close();}catch(final Exception e){}
		try { if(connection!=null) connection.close();}catch(final Exception e){}
		if(save_thread!=null)
		{
			CMLib.threads().deleteTick(save_thread, -1);
			save_thread=null;
		}
		try { save(); }
		catch( final PersistenceException e ) { }
		try { if(input_thread!=null) CMLib.killThread(input_thread,100,1); }catch(final Exception e){}
		input_thread=null;
		shutdown=false;
	}