Fix listing of files

pull/1/head
Louis Royer 5 years ago
parent c1ac428fc6
commit 019d8b321f

@ -139,13 +139,15 @@ public class ClientManagementUDP implements Runnable {
try{
InetAddress dst = InetAddress.getByName(host);
byte [] buffer = msg.getBytes();
byte [] buffer2 = new byte[1500];
DatagramSocket socket = new DatagramSocket();
DatagramPacket reception = new DatagramPacket(buffer, buffer.length);
DatagramPacket reception = new DatagramPacket(buffer2, 1500);
DatagramPacket emission = new DatagramPacket(buffer, buffer.length, dst, UDPPort);
socket.send(emission);
socket.receive(reception);
return new String(reception.getData(), 0, reception.getLength());
} catch (Exception e){
System.out.println(e);
throw new TransmissionError();
}

Loading…
Cancel
Save