Registrar allows centralised registration of participants in a Utopia based network music application. Registrar can run on one of the nodes in a subnetwork, or on a separate node. (The latter can be useful where stability is a concern.) Registrar keeps track of Peers joining and leaving a subnetwork, and their online status, and distributes this information to all members.
By using different OSC paths multiple subnetworks can exist on the same physical network. Each participant in a subnetwork should create a Registrant with the same path.
Registrar holds an AddrBook as an instance variable. This can be passed to other Utopia objects on the Registrant's node, and will be updated as appropriate.
Create a new Registrar.
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. |
period |
The interval in seconds between pings to Peers being sent. Peers which have not responded for > (2 * period) seconds will be marked offline. |
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 Registrar 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. |
A new Registrar instance.
Free this object and its OSCFuncs. After this, this Registrar (and probably its AddrBook) should not be used.