Get Current region?


exists set_region... but....

How get current region in my lobby ?


  • Hi @coldev.

    In case that you have connected with RegionSelectionMode::BEST, the Client is connected to the region that is returned by getRegionWithBestPing().

    In case that you have connected with RegionSelectionMode::SELECT, it's connected to the region that you have selected, so you can simply store your choice when you call selectRegion(), in case that you want to check it at a later state.

    In case that you have connected with RegionSelectionMode::DEFAULT its just always connected to the default region. This is simply the first entry in the list of available regions and if you connect to the public cloud and have not restricted the available regions in the dashboard, the this should normally mean region 'eu'.
    However if the region-choice is relevant enough for you to ask for how to retrieve the current region, then you probably should not use RegionSelectionMode::DEFAULT anyway, as it basically means "I don't care about the region, as long as every client connects to the same region".
  • thanks... very usefull info...
Sign In or Register to comment.