OSCRouterClient is an interface to connect by TCP to an instance of tcposcrouter by Bruno Gola, see https://github.com/bgola/tcposcrouter.
Like OSCgroups, it forwards incoming messages to all connected clients except the sender. It also sends a current userlist whenever logins change.
running on a webserver, e.g. on "bgo.la"
First code examples:
Check whether a client with these args already exists. This is used to prevent multiple identical clients.
serverAddr | |
userName | |
groupName |
create a new client with:
userName |
the userName with which to login |
groupName |
name of the group to join. default is 'oscrouter' |
serverAddr |
the address of the server where tcposcrouter runs |
userPassword |
userPassword for that userName |
groupPassword |
password for the group to join. default is 'oscrouter' |
serverport |
optional: on which port to log into the server |
onJoined |
function to do when joined |
Dictionary of known groups
instance variables set on creation
action to run after join succeeded
join the group on the server
onSuccess |
function to run when joining succeeded |
onFailure |
... or failed |
close connection to the server
test whether netAddr is currently connected
test whether client is currently joined group
names of all peers currently in the group
send a message to the group
expand an array of args to a message and send to the group
symbol |
message name |
array |
arguments |
add a responder func by id/message name
remove a responder func by id
all current responderFuncs
all currently active OSCFuncs
send a private message to a user in the group
name |
name of the user to send to |
args |
message name and args to send |
add a private responder func by id/message name
remove a private responder func by id/message name
dict of the private responder funcs
the netAddr of the server
the tcp receive port of the server.