|
| Game (GameApplication application, string gameId, Hive.Caching.RoomCacheBase roomCache=null, IPluginManager pluginManager=null, string pluginName="", Dictionary< string, object > environment=null, ExtendedPoolFiber executionFiber=null) |
| Initializes a new instance of the Game class. More...
|
|
override void | OnClose () |
|
| HiveHostGame (string gameName, RoomCacheBase roomCache, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0, IPluginManager pluginManager=null, string pluginName="", Dictionary< string, object > environment=null, int lastTouchLimitMilliseconds=0, int lastTouchCheckIntervalMilliseconds=0, HttpRequestQueueOptions httpRequestQueueOptions=null, ExtendedPoolFiber executionFiber=null) |
|
override bool | BeforeRemoveFromCache () |
| Called by the RoomCacheBase if the room is about to be removed from the cache. More...
|
|
override void | OnClose () |
|
Dictionary< byte, byte[]> | GetGameStateAsByteArray () |
|
bool | SetGameState (Dictionary< byte, byte[]> state) |
|
void | HttpQueueRequestsIncrement () |
|
void | HttpQueueResponsesIncrement () |
|
void | HttpQueueSuccessIncrement () |
|
void | HttpQueueTimeoutIncrement () |
|
void | HttpQueueErrorsIncrement () |
|
void | HttpQueueOfflineResponsesIncrement () |
|
void | HttpQueueConcurrentRequestsIncrement () |
|
void | HttpQueueConcurrentRequestsDecrement () |
|
void | HttpQueueQueuedRequestsIncrement () |
|
void | HttpQueueQueuedRequestsDecrement () |
|
void | HttpRequestExecuteTimeIncrement (long ticks) |
|
void | HttpQueueOnlineQueueCounterIncrement () |
|
void | HttpQueueOnlineQueueCounterDecrement () |
|
void | HttpQueueBackedoffRequestsIncrement () |
|
void | HttpQueueBackedoffRequestsDecrement () |
|
void | HttpRequestIncrement () |
|
void | HttpSuccessIncrement () |
|
void | HttpTimeoutIncrement () |
|
void | HttpErrorsIncrement () |
|
void | HttpResponseIncrement () |
|
bool | OnUnknownType (Type type, ref object obj) |
|
override void | RemoveInactiveActor (Actor actor) |
|
SerializableGameState | GetSerializableGameState () |
|
Dictionary< string, object > | GetGameState () |
|
bool | SetGameState (Dictionary< string, object > state) |
|
| HiveGame (string gameName, RoomCacheBase roomCache, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0, int lastTouchLimitMilliseconds=0, int lastTouchCheckIntervalMilliseconds=0, ExtendedPoolFiber executionFiber=null) |
| Initializes a new instance of the HiveGame class. More...
|
|
override string | ToString () |
|
bool | CheckBeforeJoinThisIsNewCreatedRoom (JoinGameRequest request) |
|
bool | CheckAfterJoinThisIsNewCreatedRoom (bool isNewActor) |
|
void | PublishEventDiconnected (Actor actor, int? newMasterClientId) |
|
void | OnActorRemoved (Actor actor) |
|
void | OnActorDeactivated (Actor actor) |
|
| Room (string name, RoomCacheBase roomCache=null, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0, ExtendedPoolFiber executionFiber=null) |
| Initializes a new instance of the Room class without a room name. More...
|
|
override string | ToString () |
|
void | EnqueueMessage (IMessage message) |
| Enqueues an IMessage to the end of the execution queue. More...
|
|
void | EnqueueOperation (HivePeer peer, OperationRequest operationRequest, SendParameters sendParameters) |
| Enqueues an OperationRequest to the end of the execution queue. More...
|
|
IDisposable | ScheduleMessage (IMessage message, long timeMs) |
| Schedules a message to be processed after a specified time. More...
|
|
void | Dispose () |
| Releases resources used by this instance. More...
|
|
void | Release () |
|
|
override void | Dispose (bool disposing) |
| Releases unmanaged and - optionally - managed resources More...
|
|
override void | JoinFailureHandler (byte leaveReason, HivePeer peer, JoinGameRequest request) |
|
override bool | ProcessJoin (int actorNr, JoinGameRequest joinRequest, SendParameters sendParameters, ProcessJoinParams prms, HivePeer peer) |
|
override bool | ProcessCreateGame (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters) |
|
override void | OnGamePropertiesChanged (SetPropertiesRequest request) |
|
override void | DeactivateActor (Actor actor) |
|
override void | CleanupActor (Actor actor) |
|
override void | ExecuteOperation (HivePeer peer, OperationRequest operationRequest, SendParameters sendParameters) |
| This method is invoked sequentially for each operation request enqueued in the ExecutionFiber using the EnqueueOperation method. More...
|
|
override void | ProcessMessage (Photon.Hive.Messages.IMessage message) |
|
virtual void | CheckGame () |
| Check routine to validate that the game is valid (ie., it is removed from the game cache if it has no longer any actors etc.). CheckGame() is called by the Application at regular intervals. More...
|
|
virtual void | NotifyMasterUserDeactivated (string userId) |
|
virtual void | NotifyMasterUserLeft (string userId) |
|
virtual void | NotifyMasterUserFailedToAdd (GameClientPeer peer) |
|
virtual void | NotifyMasterUserAdded (string userId, string[] slots) |
|
virtual void | NotifyMasterUserAdded (string[] userIds, string[] slots) |
|
override void | OnActorBanned (Actor actor) |
|
UpdateGameEvent | GetUpdateGameEvent () |
|
virtual void | UpdateGameStateOnMasterOnCreate (JoinGameRequest joinRequest, HivePeer peer) |
|
virtual void | UpdateGameStateOnMaster (byte? newMaxPlayer=null, bool? newIsOpen=null, bool? newIsVisble=null, object[] lobbyPropertyFilter=null, Hashtable gameProperties=null, string[] newUserId=null, string removedUserId=null, bool reinitialize=false, string[] inactiveList=null, ExcludedActorInfo[] excludedActorInfos=null, string[] expectedList=null, bool? checkUserIdOnJoin=null) |
|
virtual void | UpdateGameStateOnMaster (UpdateGameEvent updateEvent) |
|
virtual void | RemoveGameStateFromMaster () |
|
override void | HandleCreateGameOperation (HivePeer peer, SendParameters sendParameters, CreateGameRequest createGameRequest) |
|
override void | HandleJoinGameOperation (HivePeer peer, SendParameters sendParameters, JoinGameRequest joinGameRequest) |
| Handles the JoinGameRequest: Joins a peer to a room and calls PublishJoinEvent. Before a JoinOperation reaches this point (inside a room), the HivePeer made sure that it is removed from the previous Room (if there was any). More...
|
|
bool | ReinitGame () |
|
override void | HandleLeaveOperation (HivePeer peer, SendParameters sendParameters, LeaveRequest leaveOperation) |
| Handles the LeaveRequest and calls HiveGame.RemovePeerFromGame. More...
|
|
override void | HandleRaiseEventOperation (HivePeer peer, RaiseEventRequest raiseEventRequest, SendParameters sendParameters) |
| Handles the RaiseEventRequest: Sends a CustomEvent to actors in the room. More...
|
|
override void | HandleRemovePeerMessage (HivePeer peer, int reason, string details) |
|
override void | HandleSetPropertiesOperation (HivePeer peer, SetPropertiesRequest request, SendParameters sendParameters) |
| Handles the SetPropertiesRequest and sends event PropertiesChangedEvent to all Actors in the room. More...
|
|
virtual bool | ProcessBeforeJoinGame (JoinGameRequest joinRequest, SendParameters sendParameters, HivePeer peer) |
|
virtual bool | ProcessBeforeSetProperties (HivePeer peer, SetPropertiesRequest request, Hashtable oldValues, SendParameters sendParameters) |
|
virtual bool | ProcessSetProperties (HivePeer peer, bool result, string errorMsg, SetPropertiesRequest request, SendParameters sendParameters) |
|
virtual bool | ProcessBeforeCloseGame (CloseRequest request) |
|
override void | JoinFailureHandler (byte leaveReason, HivePeer peer, JoinGameRequest request) |
|
virtual bool | ProcessCloseGame (object state) |
|
virtual bool | ProcessLeaveGame (int actorNr, LeaveRequest request, SendParameters sendParameters, HivePeer peer) |
|
virtual bool | ProcessRaiseEvent (HivePeer peer, RaiseEventRequest raiseEventRequest, SendParameters sendParameters, Actor actor) |
|
override OperationResponse | GetUserJoinResponse (JoinGameRequest joinRequest, int actorNr, ProcessJoinParams prms) |
|
bool | CreateGame (HivePeer peer, JoinGameRequest request, SendParameters sendParameters) |
|
override void | ExecuteOperation (HivePeer peer, OperationRequest operationRequest, SendParameters sendParameters) |
| Called for each operation in the execution queue. Every Room has a queue of incoming operations to execute. Per game ExecuteOperation is never executed multi-threaded, thus all code executed here has thread safe access to all instance members. More...
|
|
Actor | GetActorByPeer (HivePeer peer) |
| Gets the actor for a HivePeer. More...
|
|
Hashtable | GetLobbyGameProperties (Hashtable source) |
|
Hashtable | GetLobbyGameProperties (Hashtable source, HashSet< object > list) |
|
virtual void | HandleChangeGroupsOperation (HivePeer peer, ChangeGroups changeGroupsRequest, SendParameters sendParameters) |
|
bool | UpdateCacheSlice (HivePeer peer, byte op, int? sliceIndex, ref string message) |
|
virtual void | HandleDebugGameOperation (HivePeer peer, DebugGameRequest request, SendParameters sendParameters) |
|
virtual void | HandleGetPropertiesOperation (HivePeer peer, GetPropertiesRequest getPropertiesRequest, SendParameters sendParameters) |
| Handles the GetPropertiesRequest operation: Sends the properties with the OperationResponse. More...
|
|
bool | Join (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters) |
|
bool | JoinApplyGameStateChanges (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters, out Actor actor) |
|
virtual void | SendErrorResponse (HivePeer peer, byte opCode, ErrorCode errorCode, string msg, SendParameters sendParameters, Dictionary< byte, object > errorData=null) |
|
virtual bool | AddExpectedUsers (JoinGameRequest joinRequest) |
|
bool | JoinSendResponseAndEvents (HivePeer peer, JoinGameRequest joinRequest, SendParameters sendParameters, int actorNr, ProcessJoinParams prms) |
|
void | LeaveOperationHandler (HivePeer peer, SendParameters sendParameters, LeaveRequest request) |
|
void | LogOperation (HivePeer peer, OperationRequest operationRequest) |
|
override void | ProcessMessage (IMessage message) |
| Processes a game message. Messages are used for internal communication. Per default only message RemovePeerFromGame is handled, a message that is sent when a player leaves a game due to disconnect or due to a subsequent join to a different game. More...
|
|
void | PublishEventCache (HivePeer litePeer, JoinGameRequest joinRequest) |
| Sends all cached events to a peer. More...
|
|
virtual void | PublishJoinEvent (HivePeer peer, JoinGameRequest joinRequest) |
| Sends a JoinEvent to all Actors. More...
|
|
virtual void | PublishLeaveEvent (Actor actor, int? newMasterClientId) |
| Sends a LeaveEvent to all Actors. More...
|
|
bool | RaiseEventOperationHandler (HivePeer peer, RaiseEventRequest raiseEventRequest, SendParameters sendParameters, Actor actor) |
|
virtual int | RemovePeerFromGame (HivePeer peer, bool isCommingBack) |
| Removes a peer from the game. This method is called if a client sends a LeaveRequest or disconnects. More...
|
|
bool | SetPropertiesRequestHandler (HivePeer peer, SetPropertiesRequest request, SendParameters sendParameters) |
|
void | RevertProperties (IDictionary oldPropertyValues, SetPropertiesRequest request) |
|
Hashtable | GetOldPropertyValues (SetPropertiesRequest request) |
|
bool | ValidateAndFillSetPropertiesRequest (HivePeer peer, SetPropertiesRequest request, out string errorMsg) |
|
void | PublishResultsAndSetGameProperties (bool propertiesUpdateResult, string errorMessage, SetPropertiesRequest request, HivePeer peer, SendParameters sendParameters) |
|
virtual bool | SetNewPropertyValues (SetPropertiesRequest request, out string errorMessage) |
|
virtual bool | TryAddPeerToGame (HivePeer peer, int actorNr, out Actor actor, out bool isNewActor, out ErrorCode errorcode, out string reason, JoinGameRequest joinRequest) |
| Tries to add a HivePeer to this game instance. More...
|
|
bool | UpdateEventCache (Actor actor, RaiseEventRequest raiseEventRequest, out string msg) |
| Helper method of HandleRaiseEventOperation. Stores an event for new actors. More...
|
|
bool | UpdateEventCache (Actor actor, byte eventCode, object data, byte cacheOp, out string msg) |
|
bool | UpdateEventCache (Actor actor, byte evCode, object data, CacheOperation cacheOp, ref string msg) |
|
bool | ValidateGame (HivePeer peer, JoinGameRequest joinGameRequest, SendParameters sendParameters) |
|
| Room (string name, ExtendedPoolFiber executionFiber, RoomCacheBase roomCache, IGameStateFactory gameStateFactory=null, int maxEmptyRoomTTL=0) |
| Initializes a new instance of the Room class. More...
|
|
void | PublishEvent (HiveEventBase e, Actor actor, SendParameters sendParameters) |
| Publishes an event to a single actor on a specified channel. More...
|
|
void | PublishEvent (HiveEventBase e, IEnumerable< Actor > actorList, SendParameters sendParameters) |
| Publishes an event to a list of actors on a specified channel. More...
|
|
void | PublishEvent (EventData e, IEnumerable< Actor > actorList, SendParameters sendParameters) |
| Publishes an event to a list of actors on a specified channel. More...
|
|
void | ScheduleRoomRemoval (int roomLiveTime) |
| Schedules the removal of the room instance from the cache. The room will be removed after the specified time if there are no room references left. More...
|
|
void | TryRemoveRoomFromCache () |
| Removes the room instance from the cache if there are no references to the instance left. More...
|
|