custom-module: expose send and receive shorthands, expose client's address in app event handlers

This commit is contained in:
jean-emmanuel 2019-03-20 09:07:54 +01:00
parent 9dadbf725f
commit e7ec5208e1
4 changed files with 40 additions and 10 deletions

View file

@ -44,11 +44,15 @@ class OscServer {
console,
sendOsc: this.sendOsc.bind(this),
receiveOsc: this.receiveOsc.bind(this),
send: (host, port, address, ...args)=>{
this.sendOsc({host, port, address, args:args.map(x=>this.parseArg(x))})
},
receive: (host, port, address, ...args)=>{
this.receiveOsc({host, port, address, args:args.map(x=>this.parseArg(x))})
},
app: this.customModuleEventEmitter,
setTimeout,
clearTimeout,
setInterval,
clearInterval,
setTimeout, clearTimeout,
setInterval, clearInterval,
settings,
options: customModule.slice(1, customModule.length)
}