PeerGroup:
Filter:
Utopia/Classes (extension) | Utopia | External Control > OSC

PeerGroup
ExtensionExtension

A group of Peers

Description

PeerGroup is an Array subclass that spoofs a NetAddr. You can use it send messages to a group of Peers at the same time. PeerGroups can be constructed manually or using a PeerGroupManager which syncs groups across a Utopia. As well, AddrBook provides a number of convenience methods:

Class Methods

.new

Create a new PeerGroup.

Arguments:

name

A Symbol naming the group.

peers

A Collection of Peers to add to the new group.

Returns:

A new PeerGroup with the supplied Peers.

Instance Methods

.name

Get or set the name of this group.

Returns:

.sendRaw

Send a raw message without timestamp to the Peers in this Group.

Arguments:

rawArray

An Int8Array containing the bytes of the OSC message to send.

.sendMsg

Send a message without timestamp to the Peers in this Group.

Arguments:

 ... args

An OSC path and one or more OSC args.

.sendBundle

Send an OSC bundle with timestamp to the Peers in this Group.

Arguments:

time

A time offset from logical now in seconds.

 ... args

One or more Arrays consisting of an OSC path and one or more OSC args.