package Ex5; import java.net.InetSocketAddress; import java.util.Scanner; public class App { public static void main(String[] args) throws Exception { Server server = new Server(6666); Client client = new Client(new InetSocketAddress("localhost", 6666)); Scanner scanner = new Scanner(System.in); System.out.println("Entrez des messages :"); while (true) { String line = scanner.nextLine(); System.out.println("[Client -> Server] " + line); client.sendMessage(line); String response = client.readMessage(); System.out.println("[Client <- Server] " + response); } } }