Constructor
new ZyreGroup(name)
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of the group |
- Source:
Methods
add(zyrePeer)
Adds a new ZyrePeer to the group.
Parameters:
Name | Type | Description |
---|---|---|
zyrePeer |
ZyrePeer | ZyrePeer |
- Source:
amountOfPeers() → {number}
- Source:
Returns:
Amount of participating peers
- Type
- number
remove(zyrePeer)
Removes an existing ZyrePeer from the group.
Parameters:
Name | Type | Description |
---|---|---|
zyrePeer |
ZyrePeer | ZyrePeer |
- Source:
send(msg)
Sends a message to all group members.
Parameters:
Name | Type | Description |
---|---|---|
msg |
ZreMsg | ZreMsg |
- Source:
toObj() → {PeersObject}
Creates an object with public data of the peers in this group.
- Source:
Returns:
- Type
- PeersObject