@@ -0,0 +1,1541 @@
+package br.ufrj.cos.redes.delayLossSimulator;%0A%0Aimport java.io.ByteArrayInputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectInputStream;%0Aimport java.net.DatagramPacket;%0Aimport java.net.DatagramSocket;%0A%0Aimport br.ufrj.cos.redes.fileAccess.Chunk;%0Aimport br.ufrj.cos.redes.packet.EndPacket;%0Aimport br.ufrj.cos.redes.packet.Package;%0Aimport br.ufrj.cos.redes.receiver.Buffer;%0A%0Apublic class DelayLossSimulatorDummyTabajara extends DelayLossSimulator %7B%0A%0A%09public DelayLossSimulatorDummyTabajara(double F, double LAMBDA, double RTT) %7B%0A%09%09super(F, LAMBDA, RTT);%0A%09%09// I'm dummy. I will do nothing with these parameters. %0A%09%7D%0A%0A%09@Override%0A%09public void receive(DatagramSocket clientSocket, Buffer buffer) throws IOException,%0A%09%09%09ClassNotFoundException %7B%0A%09%09boolean keep = true;%0A%09%09while(keep) %7B%09%09%09%09%0A%09%09%09byte%5B%5D recvBytes = new byte%5B1024%5D;%0A%09%09%09DatagramPacket recvPkt = new DatagramPacket(recvBytes, recvBytes.length);%0A%09%09%09clientSocket.receive(recvPkt);%0A%09%09%09%0A%09%09%09ObjectInputStream objIStream = new ObjectInputStream(new ByteArrayInputStream(recvPkt.getData()));%0A%09%09%09%0A%09%09%09Package pkg = null;%0A%09%09%09Object obj = objIStream.readObject();%0A%09%09%09try %7B%09%09%09%09%09%0A%09%09%09%09pkg = (Package) obj;%09%09%09%09%09%0A%09%09%09%7D catch (ClassCastException e) %7B%0A%09%09%09%09EndPacket endPkt = null;%09%09%09%09%09%0A%09%09%09%09try %7B%0A%09%09%09%09%09endPkt = (EndPacket) obj;%0A%09%09%09%09%7D catch (Exception ee) %7B%0A%09%09%09%09%09System.out.println(%22Error in init object%22);%0A%09%09%09%09%7D%09%09%09%09%09%0A%09%09%09%09keep = !endPkt.getSendedEndMsg().equals(EndPacket.END_MSG);%0A%09%09%09%09buffer.alertEnd();%0A%09%09%09%7D%0A%09%09%09%0A%09%09%09if(keep) %7B%09%09%09%09%0A%09%09%09%09Chunk chunk = pkg.getChunk();%0A%09%09%09%09buffer.add(chunk);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D%0A

add a dummy delay loss simulator.