public class ServerClient { // 记录当前所有的用户 private ArrayList arrayList = new ArrayList (); public void start() { try { ServerSocket server = new ServerSocket(9999); System.out.println("服务器启动"); while (true) { // 等待客户端的请求连接:一旦接受成功就会生成客户端的对象