This commit is contained in:
xdrm-brackets 2017-05-04 12:36:53 +02:00
commit 919fac4d67
2 changed files with 11 additions and 1 deletions

View File

@ -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;

Binary file not shown.