Photon Server API Documentation v5.0RC1

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Photon.SocketServer.Rpc.Operation Class Reference

This class is a common base class for operations that have properties flagged with the DataMemberAttribute. More...

Inheritance diagram for Photon.SocketServer.Rpc.Operation:
Photon.SocketServer.Rpc.DataContract Photon.Hive.Operations.ChangeGroups Photon.Hive.Operations.DebugGameRequest Photon.Hive.Operations.GetPropertiesRequest Photon.Hive.Operations.JoinGameRequest Photon.Hive.Operations.LeaveRequest Photon.Hive.Operations.RaiseEventRequest Photon.Hive.Operations.SetPropertiesRequest Photon.Hive.WebRpc.WebRpcRequest Photon.LoadBalancing.Operations.AuthenticateRequest Photon.LoadBalancing.Operations.FindFriendsRequest Photon.LoadBalancing.Operations.GetGameListRequest Photon.LoadBalancing.Operations.GetLobbyStatsRequest Photon.LoadBalancing.Operations.JoinLobbyRequest Photon.LoadBalancing.Operations.JoinRandomGameRequest Photon.LoadBalancing.Operations.SettingsRequest Photon.LoadBalancing.ServerToServer.Operations.RegisterGameServer Photon.NameServer.Operations.AuthenticateRequest Photon.NameServer.Operations.GetRegionListRequest

Public Member Functions

 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...
 

Static Public Member Functions

static long GetTimestamp ()
 

Public Attributes

byte Code => this.OperationRequest.OperationCode
 
RequestMetaData RequestMetaData => this.OperationRequest?.RequestMetaData
 

Protected Member Functions

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...
 

Properties

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...
 

Additional Inherited Members

- Protected Attributes inherited from Photon.SocketServer.Rpc.DataContract
string errorMessage
 The error message. More...
 
bool isValid
 The is valid. More...
 

Detailed Description

This class is a common base class for operations that have properties flagged with the DataMemberAttribute.

Constructor & Destructor Documentation

◆ Operation() [1/2]

Photon.SocketServer.Rpc.Operation.Operation ( IRpcProtocol  protocol,
OperationRequest  request 
)
inline

Initializes a new instance of the Operation class. This contructor is used for incoming operations.

Parameters
protocolThere are some protcol specific types that need to be converted to other C# types, IRpcProtocol.TryConvertParameter is used for this purpose.
requestThe operation request containing the operations paramter values.

◆ Operation() [2/2]

Photon.SocketServer.Rpc.Operation.Operation ( )
inline

Initializes a new instance of the Operation class. This contructor is used for outgoing operations.

Member Function Documentation

◆ GetTimestamp()

static long Photon.SocketServer.Rpc.Operation.GetTimestamp ( )
inlinestatic

◆ OnComplete()

void Photon.SocketServer.Rpc.Operation.OnComplete ( )
inline

Updates photon counters for the measure execution time. Call OnStart first.

◆ OnCompleted()

virtual void Photon.SocketServer.Rpc.Operation.OnCompleted ( )
inlineprotectedvirtual

this method is called from inside of OnComplete() if startTime is not null

◆ OnStart()

void Photon.SocketServer.Rpc.Operation.OnStart ( )
inline

Starts measuring the execution time. Call OnComplete to update photon counters.

◆ OnStarted()

virtual void Photon.SocketServer.Rpc.Operation.OnStarted ( )
inlineprotectedvirtual

called from inside of OnStart just after startTime is set

Member Data Documentation

◆ Code

byte Photon.SocketServer.Rpc.Operation.Code => this.OperationRequest.OperationCode

◆ RequestMetaData

RequestMetaData Photon.SocketServer.Rpc.Operation.RequestMetaData => this.OperationRequest?.RequestMetaData

Property Documentation

◆ OperationRequest

OperationRequest Photon.SocketServer.Rpc.Operation.OperationRequest
get

Gets the underlying OperationRequest.