IOperationHandler qustions
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?
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?
0
Comments
-
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.0 -
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?0 -
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)0