[sockets.users.count]

sockets.users.count is a slot in the sockets namespace, in Hyperlambda, the language of Magic Cloud. Counts connected socket users, optionally filtered by username.

  • Returns: Resolves to the number of connected socket users matching the optional filter

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
[filter] string no Username filter.

JSON declaration

This is the complete declaration of sockets.users.count, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "sockets.users.count",
  "description": "Counts connected socket users, optionally filtered by username",
  "signature": {
    "children": {
      "filter": {
        "type": "string",
        "kind": "username",
        "description": "Username filter",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "role": "Option",
        "projection": "Value"
      }
    },
    "output": {
      "mode": "Value",
      "kind": "integer,number",
      "description": "Resolves to the number of connected socket users matching the optional filter"
    }
  }
}

← sockets.users all sockets.* slots