package cz.vutbr.feec.session.feedback;

import oldPackets.LMVPacket;

import org.apache.log4j.Logger;


public class ThreadInMulticast extends ThreadIn {
	private static Logger logger = Logger.getLogger(ThreadInMulticast.class
			.getName());
	private FeedbackSessionStatus status; 
	public ThreadInMulticast(FeedbackSessionStatus status) {
		this.status = status;
		setName("TTP-FT(in Multicast)");
	}

	@Override
	public void run() {
		logger.debug("STARTED");
		while (true) {
			try {
				// receive
				sleep(1000);
				LMVPacket p = new LMVPacket();
				getSession().received(p);
				logger.debug("Received packet" + p);
			} catch (InterruptedException e) {
			}

			if (!isRunning())
				break;
		}
		logger.debug("FINISHED");
	}
}
