SetCurrentOperationHandler

Options
PauLTech
edited January 2012 in Photon Server
SetCurrentOperationHandler no longer seems to be part of PeerBase. How do I set the new operational handler?

Comments

  • Bumping for any information on the documentation on this feature. Running latest


    Appears to be under the namespace Photon.SocketServer.Rpc.Peer that has that method only. However I am using PeerBase to build on so I don't see how I would be able to use the dispatcher, Any tips?
  • I'm also curious about the correct usage of IOperationHandler. Can OperationDispatcher be used with ServerPeerBase? The only place I can find any example usage of OperationDispatcher is in LiteWebSockets, and everything is slightly different when using web sockets (apparently). What little documentation exists suggests that OperationDispatcher provides significantly more efficient operation handling, but provides no explanation of how to use it.
  • My apologies this was infact well documented in the help file for the Socket Server

    Peer Class
    Inheritance class of PeerBase. This class uses an IOperationHandler that can be set with SetCurrentOperationHandler(IOperationHandler). This is useful if operations should have a different behavior when the state of the peer changes, e.g. after authentication.

    You must inherit from Peer not PeerBase if you want to implement the IOperationHandler.

    Thanks Exit Games!