Proud::CSuperPeerSelectionPolicy Class Reference

super peer selection policy More...

Public Member Functions

bool operator== (const CSuperPeerSelectionPolicy &rhs) const
 

Static Public Member Functions

static PROUDSRV_API
CSuperPeerSelectionPolicy 
GetOrdinary ()
 
static PROUDSRV_API
CSuperPeerSelectionPolicy 
GetNull ()
 

Public Attributes

double m_realUdpWeight
 
double m_noNatDeviceWeight
 
double m_serverLagWeight
 
double m_peerLagWeight
 
double m_sendSpeedWeight
 
double m_frameRateWeight
 
int64_t m_excludeNewJoineeDurationTimeMs
 

Detailed Description

super peer selection policy

Member Function Documentation

static PROUDSRV_API CSuperPeerSelectionPolicy Proud::CSuperPeerSelectionPolicy::GetNull ( )
static

DO NOT USE THIS.

static PROUDSRV_API CSuperPeerSelectionPolicy Proud::CSuperPeerSelectionPolicy::GetOrdinary ( )
static

Previously prepared type are set and then returned.

Member Data Documentation

int64_t Proud::CSuperPeerSelectionPolicy::m_excludeNewJoineeDurationTimeMs

To be disregarded as super peer when the time from the moment that the client participated to the P2P group to now is less than the time designated here. This is in millisecond.

  • Set as 0 then the disregard will not occur.
  • Usually set to prevent super peer eing changed too often.
double Proud::CSuperPeerSelectionPolicy::m_frameRateWeight

The weight to the frame rate measured by user

  • This value increases proportional to frame rate value 1. For an example, if assumed that sustaining 60 fps is regarded as an ideal super peer and lower than 20 fps as to be avoided, then entering 4 gives 20 fps * 4 = 80, 60 fps * 4 = 240 resulting 160 points in difference.
  • Measured frame rate is to be entered via Proud.CNetClient.SetApplicationHint.
double Proud::CSuperPeerSelectionPolicy::m_noNatDeviceWeight

The weight added to client that directly uses public IP - which means using no internet router. It is recommended to set this as relatively high since hole-punching rate is kept high.

double Proud::CSuperPeerSelectionPolicy::m_peerLagWeight

The weight to be deducted for each second of time of latency to other peer. This increases as the number of peers increase even if set smaller than m_serverLagWeight. It is not calculated, if you do not set CStartServerParameter.m_enablePingTest as true.

double Proud::CSuperPeerSelectionPolicy::m_realUdpWeight

The weight added when UDP communication to server is on. This weight must be overwhelming.

double Proud::CSuperPeerSelectionPolicy::m_sendSpeedWeight

The weight added to transmission speed of 10Mbps. This weight may be needed as home internet connection has relatively low spees for uploading.

double Proud::CSuperPeerSelectionPolicy::m_serverLagWeight

The weight added for each second of time of latency to server. If a super peer is communicating with server often then this must be set high.