public void Command(String str, int idUser){
        JSONParser parser = new JSONParser();
        try{
            Object obj = parser.parse(str);
            JSONObject jsonObject = (JSONObject) obj;
            String packet = (String)jsonObject.get("packet");
            System.out.println(packet);
            if(packet != null){
                switch(packet.toLowerCase()){
                    case "connect_user":
                        //System.out.println(packet);
                        ConnectUser(jsonObject, idUser);
                        break;
                    case "create_room":
                        //System.out.println(packet);
                        CreateRoom(jsonObject);
                        break;
                    case "connect_room":
                        //System.out.println(packet);
                        ConnectRoom(jsonObject);
                        break;
                    case "action_server":
                        //System.out.println(packet);
                        ActionServer(jsonObject);
                        break;
                    case "exit_client":
                        exitClient(jsonObject);
                        break;
                    case "all_room":
                        GetAllRoom(idUser);
                        break;
                }
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }