@@ -0,0 +1,1190 @@
+package tp4_reseau;%0A%0Aimport java.io.IOException;%0Aimport java.net.DatagramPacket;%0Aimport java.net.DatagramSocket;%0Aimport java.net.InetAddress;%0Aimport java.net.SocketException;%0Aimport java.net.UnknownHostException;%0A%0Apublic class ClientUdpdaytime %7B%0A%09private String hostname;%0A%09private int port;%0A%09%0A%09public ClientUdpdaytime(String hostname, int port)%7B%0A%09%09this.hostname = hostname;%0A%09%09this.port = port;%0A%09%09lancer();%0A%09%7D%0A%09%0A%09public void lancer()%7B%0A%09%09String ligne;%0A%09%09byte%5B%5D buf = new byte%5B512%5D;%0A%09%09String msg = new String();%0A%09%09%09try %7B%0A%09%09%09%09DatagramSocket socket = new DatagramSocket();%0A%09%09%09%09DatagramPacket packetSend = new DatagramPacket(msg.getBytes(),%0A%09%09%09%09%09%09msg.length(), InetAddress.getByName(this.hostname),this.port);%0A%09%09%09%09System.out.println(%22client daytime lanc%C3%A9 vers : %22+ this.hostname +%22:%22+ this.port);%0A%09%09%09%09socket.send(packetSend);%0A%09%09%09%09DatagramPacket date = new DatagramPacket(buf, buf.length);%0A%09%09%09%09socket.receive(date);%0A%09%09%09%09System.out.println(new String(date.getData(),0,date.getLength()));%0A%09%09%09%09socket.close();%0A%09%09%09%7D catch (IOException e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%0A%09%7D%0A%09%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09ClientUdpdaytime client = new ClientUdpdaytime(%22139.124.187.154%22,5003);%0A%0A%09%7D%0A%0A%7D%0A

Create ClientUdpdaytime.java