while(true){?
?????socket?=?serverSocket.accept();
?????
?????ServerThread??serverthread?=?new?ServerThread(socket);
?????
?????serverthread.start();
?????i++;
?????System.out.print("客戶端的數(shù)量:"+i+"-------");
?????InetAddress?address?=?socket.getInetAddress();
?????System.out.println("客戶端的IP地址:"+address.getHostAddress());
}----服務(wù)器即將啟動,等待客戶端的鏈接----客戶端的數(shù)量:1-------客戶端的IP地址:127.0.0.1我是服務(wù)器,客戶端說:用戶名:tom;密碼 : 456
添加回答
舉報
0/150
提交
取消