|void||SetRegions (OperationResponse opGetRegions)|
|RegionHandler (ushort masterServerPortOverride=0)|
|bool||PingMinimumOfRegions (Action< RegionHandler > onCompleteCallback, string previousSummary)|
|The implementation of PhotonPing to use for region pinging (Best Region detection). More...|
|List< Region >||EnabledRegions|
|A list of region names for the Photon Cloud. Set by the result of OpGetRegions(). More...|
|When PingMinimumOfRegions was called and completed, the BestRegion is identified by best ping. More...|
|This value summarizes the results of pinging currently available regions (after PingMinimumOfRegions finished). More...|
Your logic can decide to either connect to one of those regional servers, or it may use PingMinimumOfRegions to test which region provides the best ping.
It makes sense to make clients "sticky" to a region when one gets selected. This can be achieved by storing the SummaryToCache value, once pinging was done. When the client connects again, the previous SummaryToCache helps limiting the number of regions to ping. In best case, only the previously selected region gets re-pinged and if the current ping is not much worse, this one region is used again.
When PingMinimumOfRegions was called and completed, the BestRegion is identified by best ping.
A list of region names for the Photon Cloud. Set by the result of OpGetRegions().
Implement ILoadBalancingCallbacks and register for the callbacks to get OnRegionListReceived(RegionHandler regionHandler). You can also put a "case OperationCode.GetRegions:" into your OnOperationResponse method to notice when the result is available.
This value summarizes the results of pinging currently available regions (after PingMinimumOfRegions finished).
This value should be stored in the client by the game logic. When connecting again, use it as previous summary to speed up pinging regions and to make the best region sticky for the client.