Photon .NET Client API 4.1.4.8

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

Provides tools for the Exit Games Protocol More...

Static Public Member Functions

static bool TryRegisterType (Type type, byte typeCode, SerializeMethod serializeFunction, DeserializeMethod deserializeFunction)
 
static bool TryRegisterType (Type type, byte typeCode, SerializeStreamMethod serializeFunction, DeserializeStreamMethod deserializeFunction)
 
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 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 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 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...
 

Detailed Description

Provides tools for the Exit Games Protocol

Member Function Documentation

◆ Deserialize() [1/4]

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

◆ Deserialize() [2/4]

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

◆ Deserialize() [3/4]

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

◆ Deserialize() [4/4]

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

◆ Serialize() [1/4]

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

◆ Serialize() [2/4]

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

◆ Serialize() [3/4]

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

◆ Serialize() [4/4]

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

◆ TryRegisterType() [1/2]

static bool ExitGames.Client.Photon.Protocol.TryRegisterType ( Type  type,
byte  typeCode,
SerializeMethod  serializeFunction,
DeserializeMethod  deserializeFunction 
)
inlinestatic

◆ TryRegisterType() [2/2]

static bool ExitGames.Client.Photon.Protocol.TryRegisterType ( Type  type,
byte  typeCode,
SerializeStreamMethod  serializeFunction,
DeserializeStreamMethod  deserializeFunction 
)
inlinestatic

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