The SFSBuddyVariable object represents a SmartFoxServer Buddy Variable entity on the client.Namespace: Sfs2X.Entities.Variables
Assembly: SmartFox2X (in SmartFox2X.dll) Version: 22.214.171.124 (1.7.0)
public class SFSBuddyVariable : BaseVariable, BuddyVariable, Variable
The Buddy Variable is a custom value attached to a Buddy object in a Buddy List that gets automatically synchronized between client and server on every change. Buddy Variables work with the same principle of the User and Room Variables. The only difference is the logic by which they get propagated to other users. While Room and User Variables are usually broadcast to all clients in the same Room, Buddy Variables updates are sent to all users who have the owner of the Buddy Variable in their Buddy Lists. Buddy Variables are particularly useful to store custom user data that must be "visible" to the buddies only, such as a profile, a score, a status message, etc. Buddy Variables can be set by means of the SetBuddyVariablesRequest request; they support the data types listed in the class (also nested). A Buddy Variable can also be null. There is also a special convention that allows Buddy Variables to be set as "offline". Offline Buddy Variables are persistent values which are made available to all users who have the owner in their Buddy Lists, whether that Buddy is online or not. In order to make a Buddy Variable persistent, its name should start with a dollar sign ($). This conventional character is contained in the OFFLINE_PREFIX constant.