Customized data type serialization problem
Options
Comments
-
Hi @oman.
You can use Common::CustomType for this: http://doc-api.photonengine.com/en/cpp/current/html/a00056.html
For an example implementation of a custom type please see demo_typesupport inside the demos folder of the C++ Client SDK of your choice.
For example code on how you would implement serialize() and deserialize() for a more complex custom type than the one that is implemented in the demo_typesupport, please see http://forum.photonengine.com/discussion/comment/22127#Comment_221270 -
thanks kaiserludi! We found when we use C++ SDK to send operationRequest to server , if We don't set any data object(We needn't send any data to server, just an empty operationRequest with operationCode), the server can't receive the operationRequest, but with UnitySDK, doesn't have this problem, what's the reason?0
-
Hi @oman.
I have done a quick test with one of our demos and it works just fine for me.
A line like this send to a not-modified-server or the Photon Cloud (which do not implement an operation with code 1mLoadBalancingClient.opCustom(ExitGames::Photon::OperationRequest(1), true);
correctly triggers a server response with an "unknown operation" error message, which obviously means that the empty operation has reached the server just fine.
Could you provide reproduction code, please?0