Photon Server API Documentation v5.0RC1

Public Member Functions | Public Attributes | Properties | List of all members
Photon.Hive.Operations.JoinGameRequest Class Reference

This class implements the Join operation. More...

Inheritance diagram for Photon.Hive.Operations.JoinGameRequest:
Photon.SocketServer.Rpc.Operation Photon.Hive.Plugin.IJoinGameRequest Photon.SocketServer.Rpc.DataContract Photon.Hive.Plugin.IOperationRequest Photon.Hive.Operations.CreateGameRequest

Public Member Functions

 JoinGameRequest (IRpcProtocol protocol, OperationRequest operationRequest, string userId, int maxPropertiesSize, bool onlyLogMetaDataViolations=false)
 Initializes a new instance of the JoinGameRequest class. More...
 
 JoinGameRequest ()
 Initializes a new instance of the JoinGameRequest class. More...
 
Dictionary< string, object > GetCreateGameSettings (HiveGame game)
 
string GetPluginName ()
 
string GetNickname ()
 
void OnJoinFailed (ErrorCode reason, string msg)
 
void SetupRequest (string requestOwnerId)
 
int GetAddUsersSize ()
 
- Public Member Functions inherited from Photon.SocketServer.Rpc.Operation
 Operation (IRpcProtocol protocol, OperationRequest request)
 Initializes a new instance of the Operation class. This contructor is used for incoming operations. More...
 
 Operation ()
 Initializes a new instance of the Operation class. This contructor is used for outgoing operations. More...
 
void OnComplete ()
 Updates photon counters for the measure execution time. Call OnStart first. More...
 
void OnStart ()
 Starts measuring the execution time. Call OnComplete to update photon counters. More...
 
- Public Member Functions inherited from Photon.SocketServer.Rpc.DataContract
string GetErrorMessage ()
 Gets a message containing descriptive entries for each missing or invalid paramter. More...
 
Dictionary< byte, object > ToDictionary ()
 Converts all properties flagged with the DataMemberAttribute to a dictionary. More...
 

Public Attributes

bool CreateIfNotExists => this.JoinMode == JoinModeConstants.CreateIfNotExists
 
byte OperationCode => this.OperationRequest.OperationCode
 
Dictionary< byte, object > Parameters => this.OperationRequest.Parameters
 
Hashtable properties
 
bool IsRejoining => this.JoinMode == JoinModeConstants.RejoinOnly || this.JoinMode == JoinModeConstants.RejoinOrJoin
 
bool DeleteNullProps => this.GetRoomFlag(Plugin.RoomOptionFlags.DeleteNullProps)
 
PropertiesChangedEvent PropertiesChangedEvent
 properties changed event to send after join response. More...
 
- Public Attributes inherited from Photon.SocketServer.Rpc.Operation
byte Code => this.OperationRequest.OperationCode
 
RequestMetaData RequestMetaData => this.OperationRequest?.RequestMetaData
 

Properties

Hashtable ActorProperties [get, set]
 Gets or sets custom actor properties. More...
 
bool BroadcastActorProperties [get, set]
 Gets or sets a value indicating whether the actor properties should be included in the JoinEvent event which will be sent to all clients currently in the room. More...
 
virtual string GameId [get, set]
 Gets or sets the name of the game (room). More...
 
Hashtable GameProperties [get, set]
 Gets or sets custom game properties. More...
 
bool DeleteCacheOnLeave [get, set]
 Gets or sets a value indicating whether cached events are automaticly deleted for actors which are leaving a room. More...
 
bool SuppressRoomEvents [get, set]
 Gets or sets a value indicating if common room events (Join, Leave) will be suppressed. More...
 
int ActorNr [get, set]
 Actor number, which will be used for rejoin More...
 
int EmptyRoomLiveTime [get, set]
 Gets or sets a value indicating how long the room instance will be keeped alive in the room cache after all peers have left the room. More...
 
int PlayerTTL [get, set]
 The time a player the room waits to allow a player to rejoin after a disconnect. If player should be allowed to return any time set the value less than 0. More...
 
bool CheckUserOnJoin [get, set]
 Set true to restrict useres to connect only once. Default is not to check. More...
 
int? CacheSlice [get, set]
 The lowest slice of cached events the actor expects to recieve. More...
 
string LobbyName [get, set]
 
byte LobbyType [get, set]
 
string[] Plugins [get, set]
 Informs the server of the expected plugin setup. More...
 
byte WebFlags [get, set]
 
string[] AddUsers [get, set]
 
bool PublishUserId [get, set]
 
bool ForceRejoin [get, set]
 
int RoomFlags [get, set]
 
byte JoinMode [get, set]
 
WellKnownProperties wellKnownPropertiesCache [get]
 
ErrorCode FailureReason [get, protected set]
 
string FailureMessage [get, protected set]
 
- Properties inherited from Photon.SocketServer.Rpc.Operation
OperationRequest OperationRequest [get]
 Gets the underlying OperationRequest. More...
 
- Properties inherited from Photon.SocketServer.Rpc.DataContract
bool IsValid [get]
 Gets a value indicating whether all operation parameter are initialized. Call the GetErrorMessage method to get a detailed description for all missing parameters. More...
 
- Properties inherited from Photon.Hive.Plugin.IJoinGameRequest
int ActorNr [get, set]
 Actor number, which will be used for rejoin More...
 
Hashtable ActorProperties [get, set]
 Gets or sets custom actor properties. More...
 
bool BroadcastActorProperties [get, set]
 Gets or sets a value indicating whether the actor properties should be included in the JoinEvent event which will be sent to all clients currently in the room. More...
 
bool DeleteCacheOnLeave [get, set]
 Gets or sets a value indicating whether cached events are automaticly deleted for actors which are leaving a room. More...
 
int EmptyRoomLiveTime [get, set]
 Gets or sets a value indicating how long the room instance will be kept alive in the room cache after all peers have left the room. More...
 
string GameId [get, set]
 Gets or sets the name of the game (room). More...
 
Hashtable GameProperties [get, set]
 Gets or sets custom game properties. More...
 
bool SuppressRoomEvents [get, set]
 Gets or sets a value indicating if common room events (Join, Leave) will be suppressed. More...
 
bool CreateIfNotExists [get]
 True if JoinMode is CreateIfNotExists. More...
 
string LobbyName [get]
 Name of the lobby to which this room belongs. More...
 
byte LobbyType [get]
 Type of the lobby to which this room belongs. More...
 
byte JoinMode [get]
 Op Join mode. For possible values, Photon.Hive.Plugin.JoinModeConstants. More...
 
int RoomFlags [get, set]
 Different aspects of room behaviour in one place More...
 
int PlayerTTL [get, set]
 
- Properties inherited from Photon.Hive.Plugin.IOperationRequest
byte OperationCode [get]
 Unique reserved code per operation. More...
 
Dictionary< byte, object > Parameters [get]
 Operation request parameters combined as sent by client. More...
 
byte WebFlags [get, set]
 Request webflags optionnaly set by client to control webhooks behaviour. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Photon.SocketServer.Rpc.Operation
static long GetTimestamp ()
 
- Protected Member Functions inherited from Photon.SocketServer.Rpc.Operation
virtual void OnCompleted ()
 this method is called from inside of OnComplete() if startTime is not null More...
 
virtual void OnStarted ()
 called from inside of OnStart just after startTime is set More...
 
- Protected Member Functions inherited from Photon.SocketServer.Rpc.DataContract
 DataContract (IRpcProtocol protocol, IDictionary< byte, object > dataMembers)
 Initializes a new instance of the DataContract class. The params dictionary is mapped to properties flagged with the DataMemberAttribute. Check the IsValid property after creation to determine if all paramters have been initialized correctly. More...
 
 DataContract ()
 Initializes a new instance of the DataContract class. More...
 
- Protected Attributes inherited from Photon.SocketServer.Rpc.DataContract
string errorMessage
 The error message. More...
 
bool isValid
 The is valid. More...
 

Detailed Description

This class implements the Join operation.

Constructor & Destructor Documentation

◆ JoinGameRequest() [1/2]

Photon.Hive.Operations.JoinGameRequest.JoinGameRequest ( IRpcProtocol  protocol,
OperationRequest  operationRequest,
string  userId,
int  maxPropertiesSize,
bool  onlyLogMetaDataViolations = false 
)
inline

Initializes a new instance of the JoinGameRequest class.

Parameters
protocolThe protocol.
operationRequestOperation request containing the operation parameters.
userId
maxPropertiesSize
onlyLogMetaDataViolations

◆ JoinGameRequest() [2/2]

Photon.Hive.Operations.JoinGameRequest.JoinGameRequest ( )
inline

Initializes a new instance of the JoinGameRequest class.

Member Function Documentation

◆ GetAddUsersSize()

int Photon.Hive.Operations.JoinGameRequest.GetAddUsersSize ( )
inline

◆ GetCreateGameSettings()

Dictionary<string, object> Photon.Hive.Operations.JoinGameRequest.GetCreateGameSettings ( HiveGame  game)
inline

◆ GetNickname()

string Photon.Hive.Operations.JoinGameRequest.GetNickname ( )
inline

◆ GetPluginName()

string Photon.Hive.Operations.JoinGameRequest.GetPluginName ( )
inline

◆ OnJoinFailed()

void Photon.Hive.Operations.JoinGameRequest.OnJoinFailed ( ErrorCode  reason,
string  msg 
)
inline

◆ SetupRequest()

void Photon.Hive.Operations.JoinGameRequest.SetupRequest ( string  requestOwnerId)
inline

Member Data Documentation

◆ CreateIfNotExists

bool Photon.Hive.Operations.JoinGameRequest.CreateIfNotExists => this.JoinMode == JoinModeConstants.CreateIfNotExists

◆ DeleteNullProps

bool Photon.Hive.Operations.JoinGameRequest.DeleteNullProps => this.GetRoomFlag(Plugin.RoomOptionFlags.DeleteNullProps)

◆ IsRejoining

bool Photon.Hive.Operations.JoinGameRequest.IsRejoining => this.JoinMode == JoinModeConstants.RejoinOnly || this.JoinMode == JoinModeConstants.RejoinOrJoin

◆ OperationCode

byte Photon.Hive.Operations.JoinGameRequest.OperationCode => this.OperationRequest.OperationCode

◆ Parameters

Dictionary<byte, object> Photon.Hive.Operations.JoinGameRequest.Parameters => this.OperationRequest.Parameters

◆ properties

Hashtable Photon.Hive.Operations.JoinGameRequest.properties

◆ PropertiesChangedEvent

PropertiesChangedEvent Photon.Hive.Operations.JoinGameRequest.PropertiesChangedEvent

properties changed event to send after join response.

Property Documentation

◆ ActorNr

int Photon.Hive.Operations.JoinGameRequest.ActorNr
getset

Actor number, which will be used for rejoin

◆ ActorProperties

Hashtable Photon.Hive.Operations.JoinGameRequest.ActorProperties
getset

Gets or sets custom actor properties.

◆ AddUsers

string [] Photon.Hive.Operations.JoinGameRequest.AddUsers
getset

◆ BroadcastActorProperties

bool Photon.Hive.Operations.JoinGameRequest.BroadcastActorProperties
getset

Gets or sets a value indicating whether the actor properties should be included in the JoinEvent event which will be sent to all clients currently in the room.

◆ CacheSlice

int? Photon.Hive.Operations.JoinGameRequest.CacheSlice
getset

The lowest slice of cached events the actor expects to recieve.

◆ CheckUserOnJoin

bool Photon.Hive.Operations.JoinGameRequest.CheckUserOnJoin
getset

Set true to restrict useres to connect only once. Default is not to check.

◆ DeleteCacheOnLeave

bool Photon.Hive.Operations.JoinGameRequest.DeleteCacheOnLeave
getset

Gets or sets a value indicating whether cached events are automaticly deleted for actors which are leaving a room.

◆ EmptyRoomLiveTime

int Photon.Hive.Operations.JoinGameRequest.EmptyRoomLiveTime
getset

Gets or sets a value indicating how long the room instance will be keeped alive in the room cache after all peers have left the room.

This property will only be applied for the room creator.

◆ FailureMessage

string Photon.Hive.Operations.JoinGameRequest.FailureMessage
getprotected set

◆ FailureReason

ErrorCode Photon.Hive.Operations.JoinGameRequest.FailureReason
getprotected set

◆ ForceRejoin

bool Photon.Hive.Operations.JoinGameRequest.ForceRejoin
getset

◆ GameId

virtual string Photon.Hive.Operations.JoinGameRequest.GameId
getset

Gets or sets the name of the game (room).

◆ GameProperties

Hashtable Photon.Hive.Operations.JoinGameRequest.GameProperties
getset

Gets or sets custom game properties.

Game properties will only be applied for the game creator.

◆ JoinMode

byte Photon.Hive.Operations.JoinGameRequest.JoinMode
getset

◆ LobbyName

string Photon.Hive.Operations.JoinGameRequest.LobbyName
getset

◆ LobbyType

byte Photon.Hive.Operations.JoinGameRequest.LobbyType
getset

◆ PlayerTTL

int Photon.Hive.Operations.JoinGameRequest.PlayerTTL
getset

The time a player the room waits to allow a player to rejoin after a disconnect. If player should be allowed to return any time set the value less than 0.

◆ Plugins

string [] Photon.Hive.Operations.JoinGameRequest.Plugins
getset

Informs the server of the expected plugin setup.

The operation will fail in case of a plugin missmatch returning error code PluginMismatch 32757(0x7FFF - 10). Setting string[]{} means the client expects no plugin to be setup. Note: for backwards compatibility null omits any check.

◆ PublishUserId

bool Photon.Hive.Operations.JoinGameRequest.PublishUserId
getset

◆ RoomFlags

int Photon.Hive.Operations.JoinGameRequest.RoomFlags
getset

◆ SuppressRoomEvents

bool Photon.Hive.Operations.JoinGameRequest.SuppressRoomEvents
getset

Gets or sets a value indicating if common room events (Join, Leave) will be suppressed.

This property will only be applied for the game creator.

◆ WebFlags

byte Photon.Hive.Operations.JoinGameRequest.WebFlags
getset

◆ wellKnownPropertiesCache

WellKnownProperties Photon.Hive.Operations.JoinGameRequest.wellKnownPropertiesCache
get