The implementation class supports a specific real time server protocol. More...
Inherited by Photon.SocketServer.Rpc.Protocols.Amf3.Amf3Protocol, Photon.SocketServer.Rpc.Protocols.GpBinaryByte.GpBinaryByteProtocol, Photon.SocketServer.Rpc.Protocols.GpBinaryByte.GpBinaryByteProtocolV16, Photon.SocketServer.Rpc.Protocols.GpBinaryByteV2.GpBinaryByteProtocolV16V2, Photon.SocketServer.Rpc.Protocols.GpBinaryV17.GpBinaryProtocolV17, and Photon.SocketServer.Rpc.Protocols.Json.JsonProtocol.
Public Member Functions | |
void | Serialize (Stream stream, object obj, CustomTypeCache privateCustomTypeCache=null) |
Serialze an object to a stream More... | |
byte[] | SerializeEventData (EventData eventData, CustomTypeCache privateCustomTypeCache=null) |
Serializes an EventData. More... | |
byte[] | SerializeEventDataEncrypted (IEventData eventData, ICryptoProvider cryptoProvider, CustomTypeCache privateCustomTypeCache=null) |
Encrypts an EventData. More... | |
byte[] | SerializeInitRequest (string appName, Version version, ushort sdkId, bool usingIPv6) |
Serialize an init request. More... | |
byte[] | SerializeInitRequestV2 (string appName, string serverAddress, Version version, object custom) |
byte[] | SerializeInitResponse (object responseObject) |
Serialize an init response. More... | |
byte[] | SerializeMessage (object message, CustomTypeCache privateCustomTypeCache=null) |
byte[] | SerializeMessageEncrypted (object message, ICryptoProvider cryptoProvider, CustomTypeCache privateCustomTypeCache=null) |
byte[] | SerializeRawMessage (byte[] message, CustomTypeCache privateCustomTypeCache=null) |
byte[] | SerializeRawMessageEncrypted (byte[] message, ICryptoProvider cryptoProvider, CustomTypeCache privateCustomTypeCache=null) |
byte[] | SerializeInternalOperationRequest (OperationRequest operationRequest) |
Serializes an internal OperationRequest. More... | |
byte[] | SerializeInternalOperationResponse (OperationResponse operationResponse) |
Serialize an OperationResponse for system operations. More... | |
byte[] | SerializeOperationRequest (OperationRequest operationRequest, CustomTypeCache privateCustomTypeCache=null) |
Serializes an OperationRequest More... | |
byte[] | SerializeOperationRequestEncrypted (OperationRequest operationRequest, ICryptoProvider cryptoProvider, CustomTypeCache privateCustomTypeCache=null) |
Serializes an OperationRequest The operation request data will be encrypted using the specified ICryptoProvider. More... | |
byte[] | SerializeOperationResponse (OperationResponse operationResponse, CustomTypeCache privateCustomTypeCache=null) |
Serializes an OperationResponse. More... | |
byte[] | SerializeOperationResponseEncrypted (OperationResponse operationResponse, ICryptoProvider cryptoProvider, CustomTypeCache privateCustomTypeCache=null) |
Serializes an OperationResponse. The operation response data will be encrypted using the specified ICryptoProvider. More... | |
bool | TryConvertParameter (ObjectMemberInfo< DataMemberAttribute > parameterInfo, ref object value) |
Since C# supports many more types than the used protocol some parameters need to be converted. This method tries to convert an operation request parameter into to a type that works for a target field or property. More... | |
bool | TryParse (Stream stream, out object obj, CustomTypeCache privateCustomTypeCache=null) |
Try to parse an object from a stream. More... | |
bool | TryParse (byte[] data, int startIndex, int length, out object value, CustomTypeCache privateCustomTypeCache=null) |
Try to parse an object from a byte array. More... | |
bool | TryParseEncrypted (byte[] data, ICryptoProvider cryptoProvider, int startIndex, int length, out object value, CustomTypeCache privateCustomTypeCache=null) |
bool | TryParseEventData (byte[] data, out EventData eventData, CustomTypeCache privateCustomTypeCache=null) |
Tries to convert a byte array into an EventData instance. The data was serialized with IRpcProtocol.SerializeEventData. More... | |
bool | TryParseEventDataEncrypted (byte[] data, ICryptoProvider cryptoProvider, out EventData eventData, CustomTypeCache privateCustomTypeCache=null) |
Tries to convert a byte array into an EventData instance. The data was serialized with IRpcProtocol.SerializeEventDataEncrypted. More... | |
bool | TryParseMessageHeader (byte[] data, out RtsMessageHeader header) |
Tries to parse the header. More... | |
bool | TryParseOperationRequest (byte[] data, out OperationRequest operationRequest, CustomTypeCache privateCustomTypeCache=null) |
Tries to convert a byte array into an OperationRequest instance. The data was serialized with IRpcProtocol.SerializeOperationRequest. More... | |
bool | TryParseOperationRequestEncrypted (byte[] data, ICryptoProvider cryptoProvider, out OperationRequest operationRequest, CustomTypeCache privateCustomTypeCache) |
Tries to convert a byte array into an OperationRequest instance. The data was serialized with IRpcProtocol.SerializeOperationRequestEncrypted. More... | |
bool | TryParseOperationResponse (byte[] data, out OperationResponse operationResponse, CustomTypeCache privateCustomTypeCache=null) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponse. More... | |
bool | TryParseOperationResponseEncrypted (byte[] data, ICryptoProvider cryptoProvider, out OperationResponse operationResponse, CustomTypeCache privateCustomTypeCache=null) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponseEncrypted. More... | |
Properties | |
ProtocolType | ProtocolType [get] |
Gets the type of the protocol. More... | |
int | HeaderSize [get] |
Gets the size used for the protocol header. More... | |
MessageContentType | MessageContentType [get] |
The implementation class supports a specific real time server protocol.
void Photon.SocketServer.IRpcProtocol.Serialize | ( | Stream | stream, |
object | obj, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Serialze an object to a stream
stream | The stream. |
obj | The object to serialize. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeEventData | ( | EventData | eventData, |
CustomTypeCache | privateCustomTypeCache = null |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeEventDataEncrypted | ( | IEventData | eventData, |
ICryptoProvider | cryptoProvider, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Encrypts an EventData.
eventData | The event data. |
cryptoProvider | The crypto provider. |
privateCustomTypeCache |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitRequest | ( | string | appName, |
Version | version, | ||
ushort | sdkId, | ||
bool | usingIPv6 | ||
) |
Serialize an init request.
appName | The app Name. |
version | The version. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitRequestV2 | ( | string | appName, |
string | serverAddress, | ||
Version | version, | ||
object | custom | ||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitResponse | ( | object | responseObject | ) |
Serialize an init response.
byte [] Photon.SocketServer.IRpcProtocol.SerializeInternalOperationRequest | ( | OperationRequest | operationRequest | ) |
Serializes an internal OperationRequest.
operationRequest | The operation request. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInternalOperationResponse | ( | OperationResponse | operationResponse | ) |
Serialize an OperationResponse for system operations.
operationResponse | The operation response. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeMessage | ( | object | message, |
CustomTypeCache | privateCustomTypeCache = null |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeMessageEncrypted | ( | object | message, |
ICryptoProvider | cryptoProvider, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationRequest | ( | OperationRequest | operationRequest, |
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Serializes an OperationRequest
operationRequest | The operation request. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationRequestEncrypted | ( | OperationRequest | operationRequest, |
ICryptoProvider | cryptoProvider, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Serializes an OperationRequest The operation request data will be encrypted using the specified ICryptoProvider.
operationRequest | The operation request. |
cryptoProvider | An ICryptoProvider instance used to encrypt the operation request. |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationResponse | ( | OperationResponse | operationResponse, |
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Serializes an OperationResponse.
operationResponse | The response. |
privateCustomTypeCache |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationResponseEncrypted | ( | OperationResponse | operationResponse, |
ICryptoProvider | cryptoProvider, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Serializes an OperationResponse. The operation response data will be encrypted using the specified ICryptoProvider.
operationResponse | The response. |
cryptoProvider | An ICryptoProvider instance used to encrypt the operation response. |
privateCustomTypeCache |
byte [] Photon.SocketServer.IRpcProtocol.SerializeRawMessage | ( | byte[] | message, |
CustomTypeCache | privateCustomTypeCache = null |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeRawMessageEncrypted | ( | byte[] | message, |
ICryptoProvider | cryptoProvider, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
bool Photon.SocketServer.IRpcProtocol.TryConvertParameter | ( | ObjectMemberInfo< DataMemberAttribute > | parameterInfo, |
ref object | value | ||
) |
Since C# supports many more types than the used protocol some parameters need to be converted. This method tries to convert an operation request parameter into to a type that works for a target field or property.
parameterInfo | The parameter info. |
value | The value. |
bool Photon.SocketServer.IRpcProtocol.TryParse | ( | byte[] | data, |
int | startIndex, | ||
int | length, | ||
out object | value, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Try to parse an object from a byte array.
data | An array of bytes. |
startIndex | The starting position within data. |
length | The number of array elements in data to parse. |
value | The result object. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParse | ( | Stream | stream, |
out object | obj, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Try to parse an object from a stream.
stream | The stream. |
obj | The result object. |
bool Photon.SocketServer.IRpcProtocol.TryParseEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
int | startIndex, | ||
int | length, | ||
out object | value, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
bool Photon.SocketServer.IRpcProtocol.TryParseEventData | ( | byte[] | data, |
out EventData | eventData, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Tries to convert a byte array into an EventData instance. The data was serialized with IRpcProtocol.SerializeEventData.
data | The data. |
eventData | The event data. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParseEventDataEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out EventData | eventData, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Tries to convert a byte array into an EventData instance. The data was serialized with IRpcProtocol.SerializeEventDataEncrypted.
data | The data. |
cryptoProvider | The crypto provider. |
eventData | The event data. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParseMessageHeader | ( | byte[] | data, |
out RtsMessageHeader | header | ||
) |
Tries to parse the header.
data | The data. |
header | The header. |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationRequest | ( | byte[] | data, |
out OperationRequest | operationRequest, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Tries to convert a byte array into an OperationRequest instance. The data was serialized with IRpcProtocol.SerializeOperationRequest.
data | The data. |
operationRequest | The operation Request. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationRequestEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out OperationRequest | operationRequest, | ||
CustomTypeCache | privateCustomTypeCache | ||
) |
Tries to convert a byte array into an OperationRequest instance. The data was serialized with IRpcProtocol.SerializeOperationRequestEncrypted.
data | The data. |
cryptoProvider | The crypto Provider. |
operationRequest | The operation Request. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationResponse | ( | byte[] | data, |
out OperationResponse | operationResponse, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponse.
data | The data. |
operationResponse | The operation Response. |
privateCustomTypeCache |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationResponseEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out OperationResponse | operationResponse, | ||
CustomTypeCache | privateCustomTypeCache = null |
||
) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponseEncrypted.
data | The data. |
cryptoProvider | The crypto Provider. |
operationResponse | The operation Response. |
privateCustomTypeCache |
|
get |
Gets the size used for the protocol header.
|
get |
|
get |
Gets the type of the protocol.
The type of the protocol.