public CommunicationManager(ArrayList<String> mcastArgs) throws IOException {
		this.mcastArgs = mcastArgs;
		
		final int mCastPort = Integer.parseInt(this.mcastArgs.get(1));
		final int mBackupPort = Integer.parseInt(this.mcastArgs.get(3));
		final int mRecoverPort = Integer.parseInt(this.mcastArgs.get(5));
		socketMC = new DBSsocket(mCastPort);
		//socketMC.setLoopbackMode(true);
		socketMDB = new DBSsocket(mBackupPort);
		//socketMDB.setLoopbackMode(true);
		socketMDR = new DBSsocket(mRecoverPort);
		//socketMDR.setLoopbackMode(true);
		InetAddress groupMC = InetAddress.getByName(this.mcastArgs.get(0));
		InetAddress groupMDB = InetAddress.getByName(this.mcastArgs.get(2));
		InetAddress groupMDR = InetAddress.getByName(this.mcastArgs.get(4));
		socketMC.joinGroup(groupMC);
		socketMDB.joinGroup(groupMDB);
		socketMDR.joinGroup(groupMDR);
		
		done = false;
		receivedQueue = new ArrayList<Packet>();
	}