Merge branch 'master' of https://git.xdrm.io/xdrm-brackets/sysdis-project
This commit is contained in:
commit
919fac4d67
|
@ -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.
Loading…
Reference in New Issue