use opGetRoomList to take all rooms ?

benjaml
benjaml
edited September 2019 in Native
hello,

There are not so much example of how we can use opGetRoomList and I was wondering if we can make a request to take all rooms of the lobby without filtering ?

Comments

  • Kaiserludi
    Kaiserludi admin
    edited September 2019
    Hi @benjaml.

    No, requesting entirely unfiltered roomlists with opGetRoomList() is intentionally explicitly not supported as the whole purpose of that function is to get filtered room lists.
    For unfiltered room lists you can just join the default lobby or any other lobby of type LobbyType::DEFAULT and you can access an unfiltered list of all available rooms in that lobby via Client::getRoomList(). This list will automatically be updated in regular intervals as long as the client remains inside that lobby. Listener::onRoomListUpdate() will be called whenever such an updated has been applied.
  • Thanks, I also keep getting error when I try to call opGetRoomList when connected to a local photon server, what can go wrong ?
  • Kaiserludi
    Kaiserludi admin
    edited September 2019
    Hi @benjaml.

    The currently latest available version of the Photon Server SDK is based on an older version of the server side codebase than the version that is running on Photon Cloud. The opGetRoomList() feature has been introduced after the current version of the Photon Server SDK has been released. So this feature is simply not yet available with a self-hosted Photon server right now.
  • ok thanks