Photon Server API

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

Public Member Functions

virtual void AddGameState (GameState gameState)
 
int CheckJoinTimeOuts (int timeOutSeconds)
 
int CheckJoinTimeOuts (TimeSpan timeOut)
 
int CheckJoinTimeOuts (DateTime minDateTime)
 
bool ContainsGameId (string gameId)
 
virtual Hashtable GetAllGames (int maxCount)
 
virtual void OnPlayerCountChanged (GameState gameState, int oldPlayerCount)
 
virtual void OnGameJoinableChanged (GameState gameState)
 
virtual void PublishGameChanges ()
 
virtual Hashtable GetChangedGames ()
 
virtual IGameListSubscription AddSubscription (PeerBase peer, Hashtable gamePropertyFilter, int maxGameCount)
 
virtual void RemoveSubscription (PeerBase peer)
 
void RemoveGameServer (IncomingGameServerPeer gameServer)
 
bool RemoveGameState (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, IncomingGameServerPeer incomingGameServerPeer, out GameState gameState)
 

Public Attributes

AppLobby Lobby
 

Protected Member Functions

 GameListBase (AppLobby lobby)
 
virtual bool RemoveGameState (GameState gameState)
 
void HandleVisibility (GameState gameState, bool oldVisible)
 
GameState GetGameState (string gameId)
 
bool GetOrAddUpdatedGameState (UpdateGameEvent updateOperation, out GameState gameState)
 

Static Protected Member Functions

static void LogGameState (string prefix, GameState gameState)
 

Protected Attributes

Dictionary< string, GameStatechangedGames
 
LinkedListDictionary< string, GameStategameDict
 
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)
inlinevirtual

◆ AddSubscription()

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

◆ CheckJoinTimeOuts() [1/3]

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

◆ CheckJoinTimeOuts() [2/3]

int Photon.LoadBalancing.MasterServer.Lobby.GameListBase.CheckJoinTimeOuts ( int  timeOutSeconds)
inline

◆ CheckJoinTimeOuts() [3/3]

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)
inlinevirtual

◆ GetChangedGames()

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

◆ GetGameState()

GameState Photon.LoadBalancing.MasterServer.Lobby.GameListBase.GetGameState ( string  gameId)
inlineprotected

◆ GetOrAddUpdatedGameState()

bool Photon.LoadBalancing.MasterServer.Lobby.GameListBase.GetOrAddUpdatedGameState ( UpdateGameEvent  updateOperation,
out GameState  gameState 
)
inlineprotected

◆ HandleVisibility()

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

◆ 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 ( IncomingGameServerPeer  gameServer)
inline

◆ RemoveGameState() [1/2]

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

◆ RemoveGameState() [2/2]

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

◆ RemoveSubscription()

virtual void Photon.LoadBalancing.MasterServer.Lobby.GameListBase.RemoveSubscription ( PeerBase  peer)
inlinevirtual

◆ 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,
IncomingGameServerPeer  incomingGameServerPeer,
out GameState  gameState 
)
inlinevirtual

Member Data Documentation

◆ changedGames

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

◆ gameDict

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

◆ Lobby

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

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