IOperationHandler qustions

edited January 2011 in Photon Server
Hello, as I have read through your lite and mmo sources you do not use IOperationHandler implementation and just custom OperationDispatcher, so what is better to use first or second approach? I have rooms as in Lite and currently the request from OnOperationRequest from my peer implementation is send to the room handler.
And question about IOperationHandler's OnOperationRequest method, it has a parameter Peer, as I think this is my implementation of peer I just need to cast to my type?


  • Lite is more basic. The lite peer does not inherit from the Peer class, so there is no IOperationHandler to set.
    I prefer to inherit from the peer class and use the IOperationHandler approach, just because it already solves a lot that you have to program yourself otherwise.
    Regarding the OnOperationRequest peer parameter: Yes, this is your peer implementation and you can cast it to your type.
  • Hello and Happy NewYear everyone. Another question.. If I change operation handler at some operation, will this operation be forwarded to new operation handler or only other operations will?
    And if it will how can i cancel this forwarding?
  • if you change the operation handler ALL future operations will arrive at the new operation handler only - until you change it again (cancel the forwarding by setting the operation handler back to the one you used before)