Photon Server API Documentation v5.0RC1

Public Member Functions | Public Attributes | List of all members
Photon.LoadBalancing.MasterServer.Lobby.PeerState Class Reference

Stores properties of peers which have joined a game. More...

Public Member Functions

 PeerState (string userId)
 
 PeerState (ILobbyPeer peer)
 

Public Attributes

readonly DateTime UtcCreated
 
readonly string UserId
 

Detailed Description

Stores properties of peers which have joined a game.

To avoid storing a reference to a peer object this class creates a copy of the peers UserId and BlockedUsers properties. This properties are needed for match making even if the peer has disconnected to join the game on the game server instance. if a reference to the peer object would be stored the garbage collector cannot remove the peer object from memory and references to the native socket server objects cannot be disposed.

Constructor & Destructor Documentation

◆ PeerState() [1/2]

Photon.LoadBalancing.MasterServer.Lobby.PeerState.PeerState ( string  userId)
inline

◆ PeerState() [2/2]

Photon.LoadBalancing.MasterServer.Lobby.PeerState.PeerState ( ILobbyPeer  peer)
inline

Member Data Documentation

◆ UserId

readonly string Photon.LoadBalancing.MasterServer.Lobby.PeerState.UserId

◆ UtcCreated

readonly DateTime Photon.LoadBalancing.MasterServer.Lobby.PeerState.UtcCreated