public ClientThread(Socket socket, User usr) {  
            try {
                this.socket = socket;  
                reader = new BufferedReader(new InputStreamReader(socket  
                        .getInputStream()));  
                writer = new PrintWriter(socket.getOutputStream());  
                // 接收客户端的基本用户信息  
/*                String inf = reader.readLine();  
                StringTokenizer st = new StringTokenizer(inf, "@");  
                user = new User(st.nextToken(), st.nextToken());  
*/                // 反馈连接成功信息  
                this.user = usr;
                writer.println(user.getName() + user.getIp() + "連線成功!");  
                writer.flush();  
                // 反馈当前在线用户信息  
                if (clients.size() > -1) {  
                    String temp = "";  
                    for (int i = clients.size() - 1; i >= 0; i--) {  
                        temp += (clients.get(i).getUser().getName() + "/" + clients  
                                .get(i).getUser().getIp())  
                                + "@";
                    }  
                    writer.println("USERLIST@" + clients.size() + "@" + temp);  
                    writer.flush();  
                    String temp1 = "";
                    for ( int i = RoomList.size() - 1; i >= 0; i-- )
                    {
                        temp1 += ( RoomList.get(i).name + "@" );
                    }
                    writer.println("ROOMLIST@" + RoomList.size() + "@" + temp1);
                    writer.flush();
                }  
                // 向所有在线用户发送该用户上线命令  
                for (int i = clients.size() - 1; i >= 0; i--) {  
                    clients.get(i).getWriter().println(  
                            "ADD@" + user.getName() + user.getIp());  
                    clients.get(i).getWriter().flush();  
                }  
            } catch (IOException e) {  
                e.printStackTrace();  
            }  
        }