Receiver groups for objc?

edited December 2012 in Native
Any plans to implement receiver groups for Objective C or should I go ahead and port that feature from the C# version?



  • 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]
  • 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.
  • 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.
Sign In or Register to comment.