diff --git a/viewer-terminal/src/ViewTerminal/PlaneContainer.java b/viewer-terminal/src/ViewTerminal/PlaneContainer.java index 98740f5..64a3cba 100644 --- a/viewer-terminal/src/ViewTerminal/PlaneContainer.java +++ b/viewer-terminal/src/ViewTerminal/PlaneContainer.java @@ -1,5 +1,6 @@ package ViewTerminal; +import java.io.IOException; import java.net.DatagramPacket; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -27,8 +28,17 @@ public class PlaneContainer { public void notifyReceive() throws InvalidFlagException{ DatagramPacket packet = this.socket.synchronousReceive(); + ByteBuffer buf = ByteBuffer.allocate(1); + buf.put((byte)16); + DatagramPacket ping = new DatagramPacket(buf.array(),buf.array().length,packet.getAddress(),packet.getPort()); + try { + this.socket.send(ping); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } - ByteBuffer buf = ByteBuffer.wrap(packet.getData()); + buf = ByteBuffer.wrap(packet.getData()); byte flag; byte nbrPlane; diff --git a/viewer-terminal/viewTerm.jar b/viewer-terminal/viewTerm.jar index af0702d..5dafac4 100644 Binary files a/viewer-terminal/viewTerm.jar and b/viewer-terminal/viewTerm.jar differ