possible to have a 'boss' device?

24 views
Skip to first unread message

Andy Woods

unread,
Oct 7, 2013, 1:56:32 PM10/7/13
to cocoo...@googlegroups.com
Hi there,
am loving Cocoon :)
I'm trying to hardwire a 'boss' device into my cocoon network.  One that can issue files to share and some commands.  Can you advise on a good way to achieve this?  I am thinking of the scenario when 1 or 2 devices out of X could be the boss device but it is only the very first device that should be so.  Currently when a device thinks it is the boss it sendMessageToAll asking for which device is the boss. If another boss device gets this message it replies, telling it that there already is such a device, and that devices ClientVO.  If no such message is received, after Y seconds, the new boss device sends a new message saying it is the boss. 
Seems clunky my method!  Is there a cleaner way?  Thanks!
Andy.

Jesse Warden

unread,
Oct 7, 2013, 2:00:46 PM10/7/13
to cocoo...@googlegroups.com
I did something similar except the except the device "creating" the room, or rather, whatever channel we're talking on made itself the boss. That way, you could guarantee that "the guy holding the boss device was the boss, every time". Been a LONG while since I used Cocoon, but I'm pretty sure there were rooms or whatever, I just forget the API.



--
You received this message because you are subscribed to the Google Groups "Cocoon P2P" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocoon-p2p+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages