Using a Custom Op with a Remote Server

I'm having a strange problem with using a CustomOp with a Remote Server. I have been modifying the Lite Application and the Real-time unity demo to set up Photon with my game. When I run the server locally, everything works perfectly. On a remote server, the real-time demo can connect to the server and see other clients connecting to the server. However, my Custom Operation always returns an Operation unknown error.

I implemented the custom operation with the following code:

Client side {Game.cs - Update()}
var parameter = new Dictionary<byte, object>();
parameter.Add((byte)100, "Hello World");
this.Peer.OpCustom((byte)1, parameter, true);

Server side {LitePeer.cs - OnOperationResponse()}
response = new OperationResponse(101,
new Dictionary<byte, object>());
response.Parameters.Add(101, "Testing");
this.SendOperationResponse(response, sendParameters);

I've tried re-copying the Server data over multiple times, tried restarting the server, and running the client exe on the server (which ended up crashing for some reason). I'm about out of troubleshooting ideas, so any thoughts or assistance would be very helpful.

Comments

  • Your problem will be server side and the description is a bit vague here.
    You run your app in a local server fine but when you copy everything to some other machine and start it there, the app "forgets" your custom operation?

    Try to uninstall the service, check if your (!) built code is deployed on your server and restart Photon.
    Have a look at the logs and check which Apps are started and if they run successfully.
    Does it load yours?
    You can also add log output to your app to make sure your code is running on the remote machine.

    Did you set the client's app name to your (custom) app's name? E.g. your app is a replacement to "Lite", then your client has to connect to "Lite" as well.
Sign In or Register to comment.