while(true){
socket = serverSocket.accept();
ServerThread serverthread = new ServerThread(socket);
serverthread.start();
i++;
System.out.print("客户端的数量:"+i+"-------");
InetAddress address = socket.getInetAddress();
System.out.println("客户端的IP地址:"+address.getHostAddress());
}----服务器即将启动,等待客户端的链接----客户端的数量:1-------客户端的IP地址:127.0.0.1我是服务器,客户端说:用户名:tom;密码 : 456
添加回答
举报
0/150
提交
取消