Photon Server API
Static Public Member Functions | Properties | List of all members
Photon.SocketServer.Protocol Class Reference

This class provides access to the available protocols. More...

Static Public Member Functions

static bool TryRegisterCustomType (Type customType, byte typeCode, Func< object, byte[]> serializeFunction, Func< byte[], object > deserializeFunction)
 Tries to register a custom type for serialisation. More...
 
static void RegisterTypeMapper (IUnknownTypeMapper mapper)
 

Properties

static bool AllowRawCustomValues [get, set]
 Gets or sets a value indicating whether unknown customes types are allowed. if set to true unknown custom types will be serialized as an RawCustomValue instance. More...
 
static Dictionary< ProtocolType, IRpcProtocolProtocols [get]
 
static IRpcProtocol Amf3V162 [get]
 Gets the Amf3 protocol version 1.6 with header version 2. More...
 
static IRpcProtocol GpBinaryV152 [get]
 Gets the GpBinary protocol version 1.5 with header version 2 More...
 
static IRpcProtocol GpBinaryV162 [get]
 Gets the GpBinary protocol version 1.6 with header version 2 More...
 
static IRpcProtocol GpBinaryV17 [get]
 Gets the GpBinary protocol version 1.7 More...
 
static IRpcProtocol Json [get]
 Gets the Json protocol implementation. More...
 

Detailed Description

This class provides access to the available protocols.

Member Function Documentation

static void Photon.SocketServer.Protocol.RegisterTypeMapper ( IUnknownTypeMapper  mapper)
inlinestatic
static bool Photon.SocketServer.Protocol.TryRegisterCustomType ( Type  customType,
byte  typeCode,
Func< object, byte[]>  serializeFunction,
Func< byte[], object >  deserializeFunction 
)
inlinestatic

Tries to register a custom type for serialisation.

Parameters
customTypeType of the custom type.
typeCodeThe type code.
serializeFunctionThe serialize function.
deserializeFunctionThe deserialize function.
Returns
True if the custom type was successfully registered; otherwise false. False will be returned if either the type or the type code allready is registered.

Property Documentation

bool Photon.SocketServer.Protocol.AllowRawCustomValues
staticgetset

Gets or sets a value indicating whether unknown customes types are allowed. if set to true unknown custom types will be serialized as an RawCustomValue instance.

true if unknown custom types are allowed; otherwise, false.

IRpcProtocol Photon.SocketServer.Protocol.Amf3V162
staticget

Gets the Amf3 protocol version 1.6 with header version 2.

IRpcProtocol Photon.SocketServer.Protocol.GpBinaryV152
staticget

Gets the GpBinary protocol version 1.5 with header version 2

IRpcProtocol Photon.SocketServer.Protocol.GpBinaryV162
staticget

Gets the GpBinary protocol version 1.6 with header version 2

IRpcProtocol Photon.SocketServer.Protocol.GpBinaryV17
staticget

Gets the GpBinary protocol version 1.7

IRpcProtocol Photon.SocketServer.Protocol.Json
staticget

Gets the Json protocol implementation.

Dictionary<ProtocolType, IRpcProtocol> Photon.SocketServer.Protocol.Protocols
staticget