Expose OnOperationResponse for Photon Cloud

Options
Hi,

any chance to expose OnOperationResponse for Photon Cloud?

I'm using custom code for OnOperationResponse() in NetworkingPeer.cs, that means on each PUN upgrade I need to merge all this code over again.

Would be great If I can set my listener when connecting to Photon Cloud server with PUN, that way I could implement the IPhotonPeerListener interface without modifiying the core Photon code.

Would be this feature possible? Or there is any way to set this listener for Photon Cloud that I'm missing?

Thanks!

Comments

  • vadim
    Options
    Hi,
    Why do you need to handle OnOperationResponse? May be this could be done with existing functionality
  • kaaizen
    Options
    Hi vadim,

    My server is returning some user data using Photon Custom Authentication method: https://doc.photonengine.com/en/realtime/current/reference/custom-authentication

    If auth success, my server send a JSON response to Photon servers with some custom parameters that I need to get in my client. That way I don't need to make an extra request to my server when user is authenticated.
  • kaaizen
    Options
    bump
  • Tobias
    Options
    I guess by now, you just edited PUN to call your method with the returned values for Custom Auth?!
    I would not implement a general callback for all operations in PUN. We put some work into hiding this layer with simpler to use callbacks. It would revert some of the simplicity we want to have for PUN.

    But, we do see the usefulness of having custom values returned in Custom Auth, so we might just as well add a callback for that explicitly.
    I hope you can supply us with a description of what you send. Would a callback "OnCustomAuth" be fine with the Dictionary of the operation return values?
  • kaaizen
    Options
    Hi Tobias,

    A callback "OnCustomAuth" with a Dictionary of the operation return values would be exactly what I need.

    Thanks!
  • Tobias
    Options
    Even though that's reasonably simple to do, I wouldn't update PUN in the Asset Store anymore, before the holiday season (cause then we wouldn't be available to help with issues).

    Can you wait until January or implement a workaround until we update?
  • kaaizen
    Options
    Sure, no problem. I can wait until January
  • Tobias
    Options
    This is done and will be in PUN v1.66, which should be out this month. Ping me, if you need it earlier and I'll send you the code early.
  • Dev
    Options
    I would also benefit from this extra callback.