Retrieving identities

Each caucus member has a unique identity within a caucus, an identity that is assigned when the member joins the caucus. You can use this identity (stored as a long integer) as a key to store client-specific information, or to determine which caucus member sent a message.

To find its own identity, a caucus member can call TStandardCaucusMember::GetIdentity.

    memberID = fCaucusMember->GetIdentity () ;
When receiving messages, a caucus member can determine which member generated the incoming message by reading the sender identifier parameter of the TStandardCaucusReceiveMessage constructor.

You can also use the sender identifier while receiving messages to filter out messages generated by the receiver. To do this, a caucus member compares the identity of the sender to its own identity, after creating the TCaucusReceiveMessage object and before streaming out the message contents.

NOTE Identifiers are unique only within a single caucus. Two caucuses can have active members with the same identifier value.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker