The implementation class supports a specific real time server protocol. More...
Inherited by Photon.SocketServer.Rpc.Protocols.GpBinaryByte.GpBinaryByteProtocolV16, Photon.SocketServer.Rpc.Protocols.GpBinaryV17.GpBinaryProtocolV17, Photon.SocketServer.Rpc.Protocols.GpBinaryV18.GpBinaryProtocolV18, and Photon.SocketServer.Rpc.Protocols.Json.JsonProtocol.
Public Member Functions | |
void | Serialize (Stream stream, object obj, SerializeSetup peerSetup=new SerializeSetup()) |
Serialize an object to a stream More... | |
byte[] | SerializeEventData (EventData eventData, SerializeSetup peerSetup=new SerializeSetup()) |
Serializes an EventData. More... | |
byte[] | SerializeEventDataEncrypted (IEventData eventData, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
Encrypts an EventData. More... | |
byte[] | SerializeInitRequest (string appName, Version version, byte sdkId, bool usingIPv6) |
Serialize an init request. More... | |
byte[] | SerializeInitRequestV2 (string appName, string serverAddress, Version version, ushort sdkId, object custom) |
byte[] | SerializeInitRequestV3 (string appName, Version version, ushort sdkId, byte platformId, bool usingIPv6, object custom, byte[] token, EncryptionData encryptionData, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeInitResponse (object responseObject) |
Serialize an init response. More... | |
byte[] | SerializeInitV3Response (InitV3Response response, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeMessage (object message, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeMessageEncrypted (object message, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeRawMessage (byte[] message, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeRawMessageEncrypted (byte[] message, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeInternalOperationRequest (OperationRequest operationRequest) |
Serializes an internal OperationRequest. More... | |
byte[] | SerializeInternalOperationResponse (OperationResponse operationResponse) |
Serialize an OperationResponse for system operations. More... | |
byte[] | SerializeOperationRequest (OperationRequest operationRequest, SerializeSetup peerSetup=new SerializeSetup()) |
Serializes an OperationRequest More... | |
byte[] | SerializeOperationRequestEncrypted (OperationRequest operationRequest, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
Serializes an OperationRequest The operation request data will be encrypted using the specified ICryptoProvider. More... | |
byte[] | SerializeOperationResponse (OperationResponse operationResponse, SerializeSetup peerSetup=new SerializeSetup()) |
Serializes an OperationResponse. More... | |
byte[] | SerializeOperationResponseEncrypted (OperationResponse operationResponse, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
Serializes an OperationResponse. The operation response data will be encrypted using the specified ICryptoProvider. More... | |
byte[] | SerializeDisconnectMessageEncrypted (DisconnectMessage message, ICryptoProvider cryptoProvider, SerializeSetup peerSetup=new SerializeSetup()) |
byte[] | SerializeDisconnectMessage (DisconnectMessage message, SerializeSetup peerSetup=new SerializeSetup()) |
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, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
Try to parse an object from a stream. More... | |
bool | TryParse (byte[] data, int startIndex, int length, out object value, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
Try to parse an object from a byte array. More... | |
bool | TryParseEncrypted (byte[] data, ICryptoProvider cryptoProvider, int startIndex, int length, out object value, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
bool | TryParseEventData (byte[] data, out EventData eventData, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, out short errorCode, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, out short errorCode, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponseEncrypted. More... | |
bool | TryParseDisconnectMessageEncrypted (byte[] data, ICryptoProvider cryptoProvider, out DisconnectMessage message, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
bool | TryParseDisconnectMessage (byte[] data, out DisconnectMessage message, out string errorMsg, SerializeSetup peerSetup=new SerializeSetup()) |
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, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Serialize an object to a stream
stream | The stream. |
obj | The object to serialize. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeDisconnectMessage | ( | DisconnectMessage | message, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeDisconnectMessageEncrypted | ( | DisconnectMessage | message, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeEventData | ( | EventData | eventData, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeEventDataEncrypted | ( | IEventData | eventData, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Encrypts an EventData.
eventData | The event data. |
cryptoProvider | The crypto provider. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitRequest | ( | string | appName, |
Version | version, | ||
byte | sdkId, | ||
bool | usingIPv6 | ||
) |
Serialize an init request.
appName | The app Name. |
version | The version. |
sdkId | |
usingIPv6 |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitRequestV2 | ( | string | appName, |
string | serverAddress, | ||
Version | version, | ||
ushort | sdkId, | ||
object | custom | ||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitRequestV3 | ( | string | appName, |
Version | version, | ||
ushort | sdkId, | ||
byte | platformId, | ||
bool | usingIPv6, | ||
object | custom, | ||
byte[] | token, | ||
EncryptionData | encryptionData, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitResponse | ( | object | responseObject | ) |
Serialize an init response.
byte [] Photon.SocketServer.IRpcProtocol.SerializeInitV3Response | ( | InitV3Response | response, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeMessageEncrypted | ( | object | message, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationRequest | ( | OperationRequest | operationRequest, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Serializes an OperationRequest
operationRequest | The operation request. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationRequestEncrypted | ( | OperationRequest | operationRequest, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationResponse | ( | OperationResponse | operationResponse, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Serializes an OperationResponse.
operationResponse | The response. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeOperationResponseEncrypted | ( | OperationResponse | operationResponse, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
peerSetup |
byte [] Photon.SocketServer.IRpcProtocol.SerializeRawMessage | ( | byte[] | message, |
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
byte [] Photon.SocketServer.IRpcProtocol.SerializeRawMessageEncrypted | ( | byte[] | message, |
ICryptoProvider | cryptoProvider, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParse | ( | Stream | stream, |
out object | obj, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Try to parse an object from a stream.
stream | The stream. |
obj | The result object. |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParseDisconnectMessage | ( | byte[] | data, |
out DisconnectMessage | message, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
bool Photon.SocketServer.IRpcProtocol.TryParseDisconnectMessageEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out DisconnectMessage | message, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
bool Photon.SocketServer.IRpcProtocol.TryParseEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
int | startIndex, | ||
int | length, | ||
out object | value, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
bool Photon.SocketServer.IRpcProtocol.TryParseEventData | ( | byte[] | data, |
out EventData | eventData, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Tries to convert a byte array into an EventData instance. The data was serialized with IRpcProtocol.SerializeEventData.
data | The data. |
eventData | The event data. |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParseEventDataEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out EventData | eventData, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
errorMsg | |
peerSetup |
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, | ||
out short | errorCode, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Tries to convert a byte array into an OperationRequest instance. The data was serialized with IRpcProtocol.SerializeOperationRequest.
data | The data. |
operationRequest | The operation Request. |
errorCode | |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationRequestEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out OperationRequest | operationRequest, | ||
out short | errorCode, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
errorCode | |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationResponse | ( | byte[] | data, |
out OperationResponse | operationResponse, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
Tries to convert a byte array into an OperationResponse instance. The data was serialized with IRpcProtocol.SerializeOperationResponse.
data | The data. |
operationResponse | The operation Response. |
errorMsg | |
peerSetup |
bool Photon.SocketServer.IRpcProtocol.TryParseOperationResponseEncrypted | ( | byte[] | data, |
ICryptoProvider | cryptoProvider, | ||
out OperationResponse | operationResponse, | ||
out string | errorMsg, | ||
SerializeSetup | peerSetup = new SerializeSetup() |
||
) |
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. |
errorMsg | |
peerSetup |
|
get |
Gets the size used for the protocol header.
|
get |
|
get |
Gets the type of the protocol.
The type of the protocol.