// --------------------------------------------------------------------- // Remove peer from group public void leave(ZrePeer peer) { peers.remove(peer.identity()); peer.incStatus(); }
// --------------------------------------------------------------------- // Send message to all peers in group public void send(ZreMsg msg) { for (ZrePeer peer : peers.values()) peer.send(msg); msg.destroy(); }
// --------------------------------------------------------------------- // Add peer to group // Ignore duplicate joins public void join(ZrePeer peer) { peers.put(peer.identity(), peer); peer.incStatus(); }