SocketClusterTopicInfo Op

SocketClusterTopicInfo

get info for clients listening on a socketcluster topic


<p>Socket Cluster Topic Info gives you information about active clients that are subscribed to a topic.</p> <p>&quot;active&quot; is defined by the &quot;timeout&quot; parameter, clients that didn&#39;t send a message for longer than the timeout will be considered inactive.</p> <p>after the &quot;soft timeout&quot; clients will be moved to the soft timeout list (and kept in active) until they either reach the full timeout and are deemed inactive or send another message.</p> <p>if a client has been considered inactive and then sends a new message, it will be moved from the inactive state to active again.</p> <p>updates and checks happen on every message received and can be manually triggered by the &quot;update&quot; trigger. please be advised that most of this runs asynchronously, so (i.e.) do not count on the timeout progress ending at 1 exactly (might be lower).</p> <p>the own client appears in NONE of these lists.</p>


Full Name
  • Ops.Extension.SocketCluster.SocketClusterTopicInfo
Visibility
  •  Extension Op - Visible to all users
License
  • MIT
AuthorgithubMaintained by Team


Example Patch socketcluster example

open this page in another browser or share the url of this patch!

Open In Editor

INPUT PORTS


Socket (Object:socketcluster)

<p>the socketcluster socket</p>

Topic (String)

<p>name of the topic</p>

Timeout (Number:

<i>integer</i>

)

<p>timeout in ms</p>

Soft Timeout (Number:

<i>integer</i>

)

<p>soft timeout in ms (should be smaller than timeout)</p>

Retain Messages (Number:

<i>integer</i>

)

<p>retain x messages of every client, keep this small (but not 0)</p>

Update (Trigger)

<p>trigger updates</p>

Receive My Data (Number:

<i>boolean</i>

)

OUTPUT PORTS


Active Clients (Array)

<p>array of active client ids</p>

Will Time Out (Object)

<p>object of clients that will timeout soon, if they do not send a new message. provides lastmessage timestamp, when it will timeout and a progress to the timeout from 0 to 1</p>

Timed Out Clients (Array)

<p>former clients that are not active anymore</p>

Messages (Object)

<p>object of retained messages for every client, with the clientid as a key</p>

Updated (Trigger)

<p>triggers on update of any of the above lists</p>


Patches using SocketClusterTopicInfo

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarstephan - 2021-05-06 09:29
Ops.User.stephan.SocketClusterTopicInfo renamed to Ops.Net.SocketCluster.SocketClusterTopicInfouser avatarstephan - 2021-05-06 12:01
Ops.Net.SocketCluster.SocketClusterTopicInfo renamed to Ops.Extension.SocketCluster.SocketClusterTopicInfouser avatarstephan - 2022-12-14 08:37
Added toggle to receive my own datauser avatarpandur - 2024-04-15 13:41