Photon .NET Client API 4.1.4.8

Public Member Functions | Public Attributes | Properties | List of all members
ExitGames.Client.Photon.OperationResponse Class Reference

Contains the server's response for an operation called by this peer. The indexer of this class actually provides access to the Parameters Dictionary. More...

Public Member Functions

override string ToString ()
 ToString() override. More...
 
string ToStringFull ()
 Extensive output of operation results. More...
 

Public Attributes

byte OperationCode
 The code for the operation called initially (by this peer). More...
 
short ReturnCode
 A code that "summarizes" the operation's success or failure. Specific per operation. 0 usually means "ok". More...
 
string DebugMessage
 An optional string sent by the server to provide readable feedback in error-cases. Might be null. More...
 
ParameterDictionary Parameters
 A Dictionary of values returned by an operation, using byte-typed keys per value. More...
 

Properties

object this[byte parameterCode] [get, set]
 Alternative access to the Parameters, which wraps up a TryGetValue() call on the Parameters Dictionary. More...
 

Detailed Description

Contains the server's response for an operation called by this peer. The indexer of this class actually provides access to the Parameters Dictionary.

The OperationCode defines the type of operation called on Photon and in turn also the Parameters that are set in the request. Those are provided as Dictionary with byte-keys. There are pre-defined constants for various codes defined in the LoadBalancing application. Check: OperationCode, ParameterCode, etc.

An operation's request is summarized by the ReturnCode: a short typed code for "Ok" or some different result. The code's meaning is specific per operation. An optional DebugMessage can be provided to simplify debugging.

Each call of an operation gets an ID, called the "invocID". This can be matched to the IDs returned with any operation calls. This way, an application could track if a certain OpRaiseEvent call was successful.

Member Function Documentation

◆ ToString()

override string ExitGames.Client.Photon.OperationResponse.ToString ( )
inline

ToString() override.

Returns
Relatively short output of OpCode and returnCode.

◆ ToStringFull()

string ExitGames.Client.Photon.OperationResponse.ToStringFull ( )
inline

Extensive output of operation results.

Returns
To be used in debug situations only, as it returns a string for each value.

Member Data Documentation

◆ DebugMessage

string ExitGames.Client.Photon.OperationResponse.DebugMessage

An optional string sent by the server to provide readable feedback in error-cases. Might be null.

◆ OperationCode

byte ExitGames.Client.Photon.OperationResponse.OperationCode

The code for the operation called initially (by this peer).

Use enums or constants to be able to handle those codes, like OperationCode does.

◆ Parameters

ParameterDictionary ExitGames.Client.Photon.OperationResponse.Parameters

A Dictionary of values returned by an operation, using byte-typed keys per value.

◆ ReturnCode

short ExitGames.Client.Photon.OperationResponse.ReturnCode

A code that "summarizes" the operation's success or failure. Specific per operation. 0 usually means "ok".

Property Documentation

◆ this[byte parameterCode]

object ExitGames.Client.Photon.OperationResponse.this[byte parameterCode]
getset

Alternative access to the Parameters, which wraps up a TryGetValue() call on the Parameters Dictionary.

Parameters
parameterCodeThe byte-code of a returned value.
Returns
The value returned by the server, or null if the key does not exist in Parameters.

The documentation for this class was generated from the following file: