下面的代码是服务器只接受一个客户端。有人可以解释一下,如何让服务器接受例如两个客户端?非常感谢您的帮助。
public class test{
private static ServerSocket server;
private static Socket client;
private static BufferedReader reader;
private static String text;
public static void main(String args[])throws IOException{
server=new ServerSocket(63400);
System.out.println("Waiting for client...");
client=server.accept();
reader=new BufferedReader(new InputStreamReader(client.getInputStream()));
while((text=reader.readLine())!=null)
System.out.println(text);
}}