Fix listing of files
This commit is contained in:
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…
Reference in New Issue
Block a user