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

Registrant
ExtensionExtension

Register a Peer in a centralised Utopia network.

Description

Registrant registers a Peer with a corresponding instance of Registrar running on the same network. Together they allow centralised registration and population of AddrBooks. (See Hail for a decentralised approach.)

Class Methods

.new

Create a new Registrant.

Arguments:

addrBook

An optional AddrBook which this instance will use to store discovered Peers. Users can pass this to other Utopia objects, and know that it will be updated as appropriate. If nil, one will be automatically created.

me

An optional Peer representing the localhost. If nil one will be automatically created using AddrBook: -addMe.

registrarAddr

An optional NetAddr specifying the broadcast address of this Utopia's Registrar. If nil, Registrant will ping for one on the local network.

authenticator

An optional authenticator, which is used to authenticate other Peers attempting to join the system. This should be an instance of a subclass of NMLAbstractAuthenticator, such as ChallengeAuthenticator or GroupPasswordAuthenticator. If nil Hail will create an instance of NonAuthenticator (no authentication).

oscPath

An OSC compliant path in the form of a Symbol or String used to identify this subnetwork. By using different paths multiple subnetworks can exist on the same physical network. In simple cases the default ('/register') can be used. This must match the path given to the corresponding Registrar.

broadcastAddr

An optional NetAddr specifying the broadcast address to use for pinging (see registrarAddr above). If none is provided NMLNetAddrMP("255.255.255.255", 57120 + (0..7)) will be used.

Returns:

A new Registrant instance

Instance Methods

.addrBook

Get this Registrants's AddrBook. This can be passed to other Utopia objects.

.free

Free this object and its OSCFuncs. After this, this Registrant (and probably its AddrBook) should not be used.