BuddyVariables are custom values attached to any Buddy in a BuddyList.

Namespace: Sfs2X.Entities.Variables
Assembly: SmartFox2 (in SmartFox2.dll) Version: 0.9.14.0

Syntax

C#
public class SFSBuddyVariable : BuddyVariable, 
	UserVariable

Remarks

They work with the same principle of the User/Room Variables.
The only difference is the logic by which they get propagated to other Users. While RoomVariables are broadcast to all clients in the same Room, BuddyVariables are updated to all Users who have the BuddyVariable owner in their BuddyLists.

BuddyVariables support basic data types and nested complex objects:

  • Null
  • Bool
  • Int
  • Double
  • String
  • SFSObject
  • SFSArray
Also there is a special convention that allows certain Variables to be "offline" Buddy Variables.
All variable names starting with a dollar sign ($) will set the BuddyVariable as persistent and make them available at any time whether the owner is online or not.

Inheritance Hierarchy

System..::..Object
  Sfs2X.Entities.Variables..::..SFSBuddyVariable

See Also