import java.net.InetSocketAddress; import client.ClientConsole; import server.Server; public class ChatApp { public static void main(String[] args) throws Exception { Server server = new Server(6665); ClientConsole client = new ClientConsole(new InetSocketAddress("localhost", 6665)); client.onConnect.connect((arg) -> { client.getClientInterface().SendCreateRoom("101"); }); client.onDisconnect.connect((arg) -> { System.out.println("Stopping server ..."); server.close(); System.out.println("Done !"); }); } }