Photon Server API Documentation v5.0RC1

Classes | Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Properties | List of all members
Photon.LoadBalancing.MasterServer.Lobby.GameListBase Class Referenceabstract
Inheritance diagram for Photon.LoadBalancing.MasterServer.Lobby.GameListBase:
Photon.LoadBalancing.MasterServer.Lobby.IGameList Photon.LoadBalancing.MasterServer.ChannelLobby.GameChannelList Photon.LoadBalancing.MasterServer.Lobby.GameList Photon.LoadBalancing.MasterServer.Lobby.SqlGameList Photon.LoadBalancing.MasterServer.Lobby.AsyncRandomGameList Photon.LoadBalancing.MasterServer.Lobby.LimitedGameList Photon.LoadBalancing.MasterServer.Lobby.SqlFilterGameList

Public Member Functions

virtual void AddGameState (GameState gameState, Dictionary< string, object > authCookie=null)
 
int CheckJoinTimeOuts (TimeSpan timeOut)
 
int CheckJoinTimeOuts (DateTime minDateTime)
 
bool ContainsGameId (string gameId)
 
virtual void OnPlayerCountChanged (GameState gameState, int oldPlayerCount)
 
virtual void OnGameJoinableChanged (GameState gameState)
 
void SetExpectReplicationFlag (bool flag, GameServerContext gameServerContext)
 
void RemoveNotReplicatedGames (GameServerContext gameServerContext)
 
virtual void UpdateLobbyLimits (bool gameListUseLegacyLobbies, int? gameListLimit, int? gameListLimitUpdates, int? gameListLimitSqlFilterResults)
 
virtual void PublishGameChanges ()
 
virtual IGameListSubscription AddSubscription (MasterClientPeer peer, Hashtable gamePropertyFilter, int maxGameCount)
 
void RemoveGameServer (GameServerContext gameServer)
 
bool RemoveGameStateByName (string gameId)
 
bool TryGetGame (string gameId, out GameState gameState)
 
abstract ErrorCode TryGetRandomGame (JoinRandomGameRequest joinRequest, ILobbyPeer peer, out GameState gameState, out string message)
 
virtual bool UpdateGameState (UpdateGameEvent updateOperation, GameServerContext incomingGameServer, out GameState gameState)
 

Public Attributes

readonly AppLobby Lobby
 

Protected Member Functions

 GameListBase (AppLobby lobby)
 
virtual Hashtable GetAllGames (int maxCount)
 
virtual Hashtable GetChangedGames ()
 
virtual void HandleVisibility (GameState gameState, bool oldVisible)
 
virtual bool RemoveGameState (GameState gameState)
 

Static Protected Member Functions

static void LogGameState (string prefix, GameState gameState)
 
static bool IsGameJoinable (JoinRandomGameRequest joinRequest, ILobbyPeer peer, GameState gameState)
 

Protected Attributes

readonly Dictionary< string, GameStatechangedGames
 
readonly LinkedListDictionary< string, GameStategameDict
 
readonly HashSet< string > removedGames
 
readonly HashSet< PeerBasepeers = new HashSet<PeerBase>()
 
LinkedListNode< GameStatenextJoinRandomStartNode
 

Properties

int ChangedGamesCount [get]
 
int Count [get]
 
int PlayerCount [get, protected set]
 
- Properties inherited from Photon.LoadBalancing.MasterServer.Lobby.IGameList
int Count [get]
 
int PlayerCount [get]
 

Constructor & Destructor Documentation

◆ GameListBase()

Photon.LoadBalancing.MasterServer.Lobby.GameListBase.GameListBase ( AppLobby  lobby)
inlineprotected

Member Function Documentation

◆ AddGameState()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.AddGameState ( GameState  gameState,
Dictionary< string, object >  authCookie = null 
)
inlinevirtual

◆ AddSubscription()

virtual IGameListSubscription Photon.LoadBalancing.MasterServer.Lobby.GameListBase.AddSubscription ( MasterClientPeer  peer,
Hashtable  gamePropertyFilter,
int  maxGameCount 
)
inlinevirtual

◆ CheckJoinTimeOuts() [1/2]

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.CheckJoinTimeOuts ( DateTime  minDateTime)
inline

◆ CheckJoinTimeOuts() [2/2]

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.CheckJoinTimeOuts ( TimeSpan  timeOut)
inline

◆ ContainsGameId()

bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.ContainsGameId ( string  gameId)
inline

◆ GetAllGames()

virtual Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameListBase.GetAllGames ( int  maxCount)
inlineprotectedvirtual

◆ GetChangedGames()

virtual Hashtable Photon.LoadBalancing.MasterServer.Lobby.GameListBase.GetChangedGames ( )
inlineprotectedvirtual

◆ HandleVisibility()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.HandleVisibility ( GameState  gameState,
bool  oldVisible 
)
inlineprotectedvirtual

◆ IsGameJoinable()

static bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.IsGameJoinable ( JoinRandomGameRequest  joinRequest,
ILobbyPeer  peer,
GameState  gameState 
)
inlinestaticprotected

◆ LogGameState()

static void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.LogGameState ( string  prefix,
GameState  gameState 
)
inlinestaticprotected

◆ OnGameJoinableChanged()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.OnGameJoinableChanged ( GameState  gameState)
inlinevirtual

◆ OnPlayerCountChanged()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.OnPlayerCountChanged ( GameState  gameState,
int  oldPlayerCount 
)
inlinevirtual

◆ PublishGameChanges()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.PublishGameChanges ( )
inlinevirtual

◆ RemoveGameServer()

void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.RemoveGameServer ( GameServerContext  gameServer)
inline

◆ RemoveGameState()

virtual bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.RemoveGameState ( GameState  gameState)
inlineprotectedvirtual

◆ RemoveGameStateByName()

bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.RemoveGameStateByName ( string  gameId)
inline

◆ RemoveNotReplicatedGames()

void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.RemoveNotReplicatedGames ( GameServerContext  gameServerContext)
inline

◆ SetExpectReplicationFlag()

void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.SetExpectReplicationFlag ( bool  flag,
GameServerContext  gameServerContext 
)
inline

◆ TryGetGame()

bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.TryGetGame ( string  gameId,
out GameState  gameState 
)
inline

◆ TryGetRandomGame()

abstract ErrorCode Photon.LoadBalancing.MasterServer.Lobby.GameListBase.TryGetRandomGame ( JoinRandomGameRequest  joinRequest,
ILobbyPeer  peer,
out GameState  gameState,
out string  message 
)
pure virtual

◆ UpdateGameState()

virtual bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.UpdateGameState ( UpdateGameEvent  updateOperation,
GameServerContext  incomingGameServer,
out GameState  gameState 
)
inlinevirtual

◆ UpdateLobbyLimits()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.UpdateLobbyLimits ( bool  gameListUseLegacyLobbies,
int?  gameListLimit,
int?  gameListLimitUpdates,
int?  gameListLimitSqlFilterResults 
)
inlinevirtual

Member Data Documentation

◆ changedGames

readonly Dictionary<string, GameState> Photon.LoadBalancing.MasterServer.Lobby.GameListBase.changedGames
protected

◆ gameDict

readonly LinkedListDictionary<string, GameState> Photon.LoadBalancing.MasterServer.Lobby.GameListBase.gameDict
protected

◆ Lobby

readonly AppLobby Photon.LoadBalancing.MasterServer.Lobby.GameListBase.Lobby

◆ nextJoinRandomStartNode

LinkedListNode<GameState> Photon.LoadBalancing.MasterServer.Lobby.GameListBase.nextJoinRandomStartNode
protected

◆ peers

readonly HashSet<PeerBase> Photon.LoadBalancing.MasterServer.Lobby.GameListBase.peers = new HashSet<PeerBase>()
protected

◆ removedGames

readonly HashSet<string> Photon.LoadBalancing.MasterServer.Lobby.GameListBase.removedGames
protected

Property Documentation

◆ ChangedGamesCount

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.ChangedGamesCount
get

◆ Count

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.Count
get

◆ PlayerCount

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.PlayerCount
getprotected set