@Override
	public void run() {
		// TODO Auto-generated method stub
		while(sendCount > 0 && !Thread.interrupted()) {
			
			try {
				TTP ttp = (TTP)data.getData();
				int category = (int)ttp.getCategory();
				System.out.println("Sending data Category: " + category);
				datagramService.sendDatagram(data);
				Thread.sleep(time);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				System.out.println("Timer Interupted");
				break;
			} catch (IOException e) {
				// TODO Auto-generated catch block
				System.out.println("sending Exception");
			}	
			
			sendCount--;
		}
		
		System.out.println("Thread killed");
		
	}