[Spread-users] How to get list of connected users

Glenn glenn at somanetworks.com
Fri Apr 20 11:40:15 EDT 2007

Serg V. Gulko wrote:
> Hello!
> How can I get list of connected to specified group users?
> I am using spread as message bus between two applications and 
> sometimes one of each parts can be unavailable. I want to check 
> if recipient is online before sending message. Is is possible?

When you connect, indicate you want membership change messages.  Every 
time you receive one, you'll have the current "user" list for a group. 
You get one when you join a group to form your initial list.

AFAIK, there is no way to query the group for membership directly.  You 
have to indicate you want membership change messages *per connection*, 
not per group.

See http://spread.org/docs/spread_docs_4/docs/sp_receive.html, 
specifically the "If This is a MEMB_MESSAGE ..." section.

Glenn McAllister     <glenn at somanetworks.com>      +1 416 348 1594
SOMA Networks, Inc.  http://www.somanetworks.com/  +1 416 977 1414

More information about the Spread-users mailing list