custom-module: fix docs typo and allow omitting host and port in receive shorthand
This commit is contained in:
parent
d6647f46e7
commit
27db8418f9
2 changed files with 9 additions and 1 deletions
|
|
@ -48,6 +48,13 @@ class OscServer {
|
|||
this.sendOsc({host, port, address, args:args.map(x=>this.parseArg(x))})
|
||||
},
|
||||
receive: (host, port, address, ...args)=>{
|
||||
if (host[0] === '/') {
|
||||
// host and port can be skipped
|
||||
args.unshift(address)
|
||||
args.unshift(port)
|
||||
address = host
|
||||
host = port = undefined
|
||||
}
|
||||
this.receiveOsc({host, port, address, args:args.map(x=>this.parseArg(x))})
|
||||
},
|
||||
app: this.customModuleEventEmitter,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue