I feel like this should be a fairly straight forward process, but I must be missing something. When I try to look up the available rooms after joining one, onGetMatchedRoomsDone is never called.
In my appwarpdelegate, I call
void CCAppwarpDelegate::onConnectDone(int res)
{
boo_isconnected=true;
if (res==AppWarp::ResultCode::success)
{
CCLog("\nonConnectDone .. SUCCESS..session=%d\n",AppWarp::AppWarpSessionID);
onConnected();
joinLobby();
}
}
void CCAppwarpDelegate::joinLobby()
{
CCLog("in joinlobby");
std::map<std::string,std::string> properties;
properties["closed"]="false";
AppWarp::Client::getInstance()->joinLobby();
AppWarp::Client::getInstance()->subscribeLobby();
AppWarp::Client::getInstance()->getRoomWithProperties(properties);
}
This code works fine when I'm first connecting, but if I actually join a room with
void HelloWorld::onJoinRoomClicked(cocos2d::CCObject *pObj)
{
roomId = roomIds.at(tag).c_str();
joinRoom(roomId);
roomIds.clear();
}
and leave the room with:
void HelloWorld::QuitGame()
{
joinLobby();
}
onGetMatchedRoomsDone never gets called and my list of available rooms is never populated. What am I doing wrong?