I want to use FindFriends in game server not master server

Options
hello.
FindFriends is not working in game room.
how can i use this function in game room?

Comments

  • Thunder
    Options
    and how can i use GetCustomRoomList in room?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Thunder,

    Thank you for choosing Photon!

    FindFriends and GetCustomRoomList work only outside of rooms when connected to Master Server.
  • Thunder
    Options
    Thanks !
    Then How can i know RoomList in room?
    Do you have solution about this topic?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    You get the list of rooms when you are not joined to a room.
    You can, of course, keep the list of rooms cached on the client and keep it available while joined to the room. But that list will be outdated and you can't guarantee that the rooms still exist or can be joined and you won't have the new ones.

    What we recommend is that you use the list of rooms only outside of rooms.

    The other options to have an updated list of rooms on the client while joined to a room:

    1. use a separate client and a separate connection. this client will remain on the master server to get the list of rooms, find friends, get app and lobby stats etc. This is not available out of the box and we do not offer support for this nor recommend it. You need to implement it yourself using a separate LoadBalancingClient instance. The separate client will count as an extra CCU, so you will have double CCU per user.
    2. use a web-based API to track list of rooms. On your own backend, store a list of rooms and keep it up to date (optionally and preferably make use of WebHooks). The client can fetch the list using HTTP requests (optionally WebRPCs).