Receiver groups for objc?
Options
Comments
-
They are already implemented for a long time now.
Its the last parameter in LitePeer::opRaiseEventCached():
[code2=objc]- (bool) opRaiseEventCached:(bool)sendReliable : (NSDictionary*)evData : (nByte)eventCode : (nByte)channelID : (nByte)eventCaching : (nByte)receiverGroup;[/code2]
The according constants can be found in PhotonConstants.h:
[code2=objc]// ReceiverGroups
static const nByte RG_OTHERS = 0;
static const nByte RG_ALL = 1;
static const nByte RG_MASTER_CLIENT = 2;[/code2]0 -
This looks different from the .Net version - are they compatible? In .Net, there's an explicit operation to subscribe to an arbitrary set of receiver groups. I need to be able to have some clients that only publish, and don't receive events from others.0
-
Oh, what you mean, isn't recevierGroups, but interestGroups.
opRaiseEvent() provides several ways of specifying the reeivers: 1. passing an array of targetActorNrs, 2. passing a receiverGroup and 3. just recently added: passing an interestGroup, all via separate overloads.
The first two options are supported in objectiveC, the 3rd one isn't yet, but its on the todo list. Until then you could either subclass and add this feature yourself or use option 1 instead.0