Photon Server API

Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | List of all members
Photon.Hive.Actor Class Reference

An actor is the glue between HivePeer and Room. In addition to the peer it has a number and Properties. More...

Inheritance diagram for Photon.Hive.Actor:
Photon.Hive.Tests.TestActor

Public Member Functions

 Actor (HivePeer peer)
 Initializes a new instance of the Actor class. More...
 
 Actor (int actorNr, string userId)
 
void Deactivate ()
 
void Reactivate (HivePeer peer)
 
void AddGroup (ActorGroup group)
 
void RemoveGroups (byte[] groupIds)
 
override string ToString ()
 
SerializableActor Serialize (bool withDebugInfo)
 

Static Public Member Functions

static Actor Deserialize (SerializableActor a)
 

Static Public Attributes

const byte BinrayPropertiesId = 1
 
static readonly string ActorNrKey = HiveHostActorState.ActorNr.ToString()
 
static readonly string UserIdKey = HiveHostActorState.UserId.ToString()
 
static readonly string BinaryKey = HiveHostActorState.Binary.ToString()
 
static readonly string NicknameKey = HiveHostActorState.Nickname.ToString()
 

Protected Member Functions

 Actor (int actorNr, string userId, IDictionary properties, DateTime? deactivationTime)
 

Properties

int ActorNr [get, set]
 Gets or sets the actor nr. More...
 
IDisposable CleanUpTimer [get, set]
 Reference to timer which will clean Actor after disconnect More...
 
DateTime? DeactivationTime [get, set]
 Time stamp when actor was deactivated More...
 
HivePeer Peer [get, set]
 Gets or sets the peer. More...
 
bool IsInactive [get]
 
bool IsActive [get]
 
PropertyBag< object > Properties [get]
 Gets the actors custom properties. More...
 
string UserId [get]
 
string Nickname [get]
 
object Secure [get]
 
object this[object key] [get, set]
 

Detailed Description

An actor is the glue between HivePeer and Room. In addition to the peer it has a number and Properties.

Constructor & Destructor Documentation

◆ Actor() [1/3]

Photon.Hive.Actor.Actor ( HivePeer  peer)
inline

Initializes a new instance of the Actor class.

Parameters
peerThe peer for this actor.

◆ Actor() [2/3]

Photon.Hive.Actor.Actor ( int  actorNr,
string  userId 
)
inline

◆ Actor() [3/3]

Photon.Hive.Actor.Actor ( int  actorNr,
string  userId,
IDictionary  properties,
DateTime?  deactivationTime 
)
inlineprotected

Member Function Documentation

◆ AddGroup()

void Photon.Hive.Actor.AddGroup ( ActorGroup  group)
inline

◆ Deactivate()

void Photon.Hive.Actor.Deactivate ( )
inline

◆ Deserialize()

static Actor Photon.Hive.Actor.Deserialize ( SerializableActor  a)
inlinestatic

◆ Reactivate()

void Photon.Hive.Actor.Reactivate ( HivePeer  peer)
inline

◆ RemoveGroups()

void Photon.Hive.Actor.RemoveGroups ( byte[]  groupIds)
inline

◆ Serialize()

SerializableActor Photon.Hive.Actor.Serialize ( bool  withDebugInfo)
inline

◆ ToString()

override string Photon.Hive.Actor.ToString ( )
inline

Member Data Documentation

◆ ActorNrKey

readonly string Photon.Hive.Actor.ActorNrKey = HiveHostActorState.ActorNr.ToString()
static

◆ BinaryKey

readonly string Photon.Hive.Actor.BinaryKey = HiveHostActorState.Binary.ToString()
static

◆ BinrayPropertiesId

const byte Photon.Hive.Actor.BinrayPropertiesId = 1
static

◆ NicknameKey

readonly string Photon.Hive.Actor.NicknameKey = HiveHostActorState.Nickname.ToString()
static

◆ UserIdKey

readonly string Photon.Hive.Actor.UserIdKey = HiveHostActorState.UserId.ToString()
static

Property Documentation

◆ ActorNr

int Photon.Hive.Actor.ActorNr
getset

Gets or sets the actor nr.

◆ CleanUpTimer

IDisposable Photon.Hive.Actor.CleanUpTimer
getset

Reference to timer which will clean Actor after disconnect

◆ DeactivationTime

DateTime? Photon.Hive.Actor.DeactivationTime
getset

Time stamp when actor was deactivated

◆ IsActive

bool Photon.Hive.Actor.IsActive
get

◆ IsInactive

bool Photon.Hive.Actor.IsInactive
get

◆ Nickname

string Photon.Hive.Actor.Nickname
get

◆ Peer

HivePeer Photon.Hive.Actor.Peer
getset

Gets or sets the peer.

◆ Properties

PropertyBag<object> Photon.Hive.Actor.Properties
get

Gets the actors custom properties.

◆ Secure

object Photon.Hive.Actor.Secure
get

◆ this[object key]

object Photon.Hive.Actor.this[object key]
getset

◆ UserId

string Photon.Hive.Actor.UserId
get