Quantum 3 3.1.0

Public Member Functions | Properties | List of all members
Photon.Realtime.Region Class Reference

Summarizes a region's properties for Best Region selection and pinging. More...

Public Member Functions

 Region (string code, string address)
 Constructs a new Region instance from code and address. More...
 
override string ToString ()
 Provides a string representation of the Region. More...
 
string ToString (bool compact=false)
 Provides a string representation of the Region, optionally including the address. More...
 

Properties

string Cluster [get]
 Unlike the region Code, this may contain cluster information. More...
 
string Code [get]
 A region's code as string (e.g. US, EU). More...
 
string HostAndPort [get]
 The address of this region. More...
 
int Ping [get, set]
 Weighted ping time. More...
 
bool WasPinged [get]
 True if the region was pinged and Ping contains a valid value. More...
 

Detailed Description

Summarizes a region's properties for Best Region selection and pinging.

Regions are usually representing geo locations (EU, US, etc) with a code, cluster, address.

Regions

Constructor & Destructor Documentation

◆ Region()

Photon.Realtime.Region.Region ( string  code,
string  address 
)
inline

Constructs a new Region instance from code and address.

Member Function Documentation

◆ ToString() [1/2]

override string Photon.Realtime.Region.ToString ( )
inline

Provides a string representation of the Region.

◆ ToString() [2/2]

string Photon.Realtime.Region.ToString ( bool  compact = false)
inline

Provides a string representation of the Region, optionally including the address.

Property Documentation

◆ Code

string Photon.Realtime.Region.Code
get

A region's code as string (e.g. US, EU).

◆ Cluster

string Photon.Realtime.Region.Cluster
get

Unlike the region Code, this may contain cluster information.

◆ HostAndPort

string Photon.Realtime.Region.HostAndPort
get

The address of this region.

◆ Ping

int Photon.Realtime.Region.Ping
getset

Weighted ping time.

Regions gets pinged 5 times (RegionPinger.Attempts). Out of those, the worst rtt is discarded and the best will be counted two times for a weighted average.

◆ WasPinged

bool Photon.Realtime.Region.WasPinged
get

True if the region was pinged and Ping contains a valid value.