ServerRegistry is a Dictionary-like class that provides a way to register Servers automatically between a number of Peers. For the simple case of one server per Peer, the -addMyServer method is useful, but more complicated arrangements, with multiple servers, shared servers, and servers on non-Peer machines are also possible.
Create a new ServerRegistry.
addrBook |
An AddrBook where Peers are registered. Note that these are the addresses of Peers who will share servers by adding them to the registry, not the addresses of the servers themselves. |
options |
A ServerOptions to use for creating new Servers. In the current implementation, ServerOptions are not shared. |
oscPath |
An optional OSC compliant path in the form of a Symbol or String used to identify this ServerRegistry. If nil the default |
A new ServerRegistry.
Get the names of the Servers in this registry.
Get a Server from the registry.
key |
A Symbol corresponding to the name of the Server. |
A Server, or nil if there is no Server with the requested name.
Convenience method to add my local server
server |
An optional Server to add. In most cases this can be left blank, which will add the default Server. |
Add a Server to this registry.
name |
A Symbol corresponding to the name of the Server. |
server |
The Server to put at this key. |