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

Peer
ExtensionExtension

A networked participant in Utopia-based systems

Description

A Peer represents a node in a Utopia based network music system. Peers are usually contained in instances of AddrBook.

Class Methods

.new

Create a new Peer.

Arguments:

name

A Symbol or String specifying a name for this Peer. This name should be unique within a given AddrBook.

addr

A NetAddr specifying the IP address and port on which this Peer can be reached.

online

A Boolean indicating whether or not this Peer is online. Classes like Hail and Registrar set this value automatically.

Returns:

A Peer instance.

Instance Methods

.name

Get this Peer's name.

Returns:

.online

Get or set whether this Peer is currently online. Usually an object like a Hail or Registrar would set this value automatically.

Arguments:

bool

(describe argument here)

Returns:

==

Test whether this Peer instance is equivalent to another. Peers are equivalent if their addrs, names, and online statuses are equivalent.

Arguments:

other

Another Peer.

Returns:

.addr

Get this Peer's addr.

Returns: