Photon .NET Client API
Static Public Member Functions | Public Attributes | List of all members
ExitGames.Client.Photon.Protocol Class Reference

Provides tools for the Exit Games Protocol More...

Static Public Member Functions

static byte[] Serialize (object obj)
 Serialize creates a byte-array from the given object and returns it. More...
 
static object Deserialize (byte[] serializedData)
 Deserialize returns an object reassembled from the given byte-array. More...
 
static void Serialize (short value, byte[] target, ref int targetOffset)
 Serializes a short typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter. More...
 
static void Serialize (int value, byte[] target, ref int targetOffset)
 Serializes an int typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter. More...
 
static void Serialize (float value, byte[] target, ref int targetOffset)
 Serializes an float typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter. More...
 
static void Deserialize (out short value, byte[] source, ref int offset)
 Deserialize fills the given short typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller. More...
 
static void Deserialize (out int value, byte[] source, ref int offset)
 Deserialize fills the given int typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller. More...
 
static void Deserialize (out float value, byte[] source, ref int offset)
 Deserialize fills the given float typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller. More...
 

Public Attributes

const string protocolType = "GpBinaryV16"
 

Detailed Description

Provides tools for the Exit Games Protocol

Member Function Documentation

static object ExitGames.Client.Photon.Protocol.Deserialize ( byte[]  serializedData)
inlinestatic

Deserialize returns an object reassembled from the given byte-array.

Parameters
serializedDataThe byte-array to be Deserialized
Returns
The Deserialized object
static void ExitGames.Client.Photon.Protocol.Deserialize ( out short  value,
byte[]  source,
ref int  offset 
)
inlinestatic

Deserialize fills the given short typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller.

Parameters
valueThe short value to deserialized into
sourceThe byte-array to deserialize from
offsetThe offset in the byte-array
static void ExitGames.Client.Photon.Protocol.Deserialize ( out int  value,
byte[]  source,
ref int  offset 
)
inlinestatic

Deserialize fills the given int typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller.

Parameters
valueThe int value to deserialize into
sourceThe byte-array to deserialize from
offsetThe offset in the byte-array
static void ExitGames.Client.Photon.Protocol.Deserialize ( out float  value,
byte[]  source,
ref int  offset 
)
inlinestatic

Deserialize fills the given float typed value with the given byte-array (source) starting at the also given offset. The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. The altered offset is this way also known to the caller.

Parameters
valueThe float value to deserialize
sourceThe byte-array to deserialize from
offsetThe offset in the byte-array
static byte [] ExitGames.Client.Photon.Protocol.Serialize ( object  obj)
inlinestatic

Serialize creates a byte-array from the given object and returns it.

Parameters
objThe object to serialize
Returns
The serialized byte-array
static void ExitGames.Client.Photon.Protocol.Serialize ( short  value,
byte[]  target,
ref int  targetOffset 
)
inlinestatic

Serializes a short typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter.

Parameters
valueThe short value to be serialized
targetThe byte-array to serialize the short to
targetOffsetThe offset in the byte-array
static void ExitGames.Client.Photon.Protocol.Serialize ( int  value,
byte[]  target,
ref int  targetOffset 
)
inlinestatic

Serializes an int typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter.

Parameters
valueThe int value to be serialized
targetThe byte-array to serialize the short to
targetOffsetThe offset in the byte-array
static void ExitGames.Client.Photon.Protocol.Serialize ( float  value,
byte[]  target,
ref int  targetOffset 
)
inlinestatic

Serializes an float typed value into a byte-array (target) starting at the also given targetOffset. The altered offset is known to the caller, because it is given via a referenced parameter.

Parameters
valueThe float value to be serialized
targetThe byte-array to serialize the short to
targetOffsetThe offset in the byte-array

Member Data Documentation

const string ExitGames.Client.Photon.Protocol.protocolType = "GpBinaryV16"

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