package cz.vutbr.feec.session.feedback;

import java.net.InetAddress;
import java.net.UnknownHostException;

import oldPackets.LMVPacket;

import org.apache.log4j.Logger;


class MyLogger extends EventAdaptor {
	private static Logger logger = org.apache.log4j.Logger
		.getLogger(EventAdaptor.class.getName());
	
	@Override
	public void received(LMVPacket packet) {
		logger.info("Prijat paket LMVPacket:"+packet);
	}
}

public class Main {
	public static void main(String[] args) throws UnknownHostException {
		InetAddress addr = InetAddress.getByName("147.229.146.241");
		int port = 5000;
		
		FeedbackSessionBase mft = new FeedbackSession(addr, port);
		mft.start();
		mft.addListener(new MyLogger());
		try {
			Thread.sleep(10000);
		} catch (InterruptedException e) {
		}
		mft.stop();
	}
}
