Coldfusion 10 Websocket - How to get list of current subscribers?

408 Views Asked by At

Coldfusion has a set of javascript methods to use with the cfwebsocket tag but I'm trying to create a live chat admin area where once logged in, there will be a list of admins who are "logged in" (subscribed) to the chat, similar to OLark. Once the admin page is loaded how can I get a list of "admin" users subscribed and list them on the page?

1

There are 1 best solutions below

0
On BEST ANSWER

I was able to figure it out. There's a ColdFusion function named wsGetSubscribers that will get a list of subscribers to a channel.

<cfset subscribers = wsGetSubscribers('chat')>

It returns an array of subscriber structs.