ipc: remove queue... it adds osc latency

This commit is contained in:
jean-emmanuel 2017-06-13 15:09:50 +02:00
parent 547f66a2a2
commit f39e5f58ae
2 changed files with 1 additions and 21 deletions

View file

@ -6,32 +6,14 @@ var Ipc = class Ipc {
constructor() {
this.queue = []
this.socket = io.connect('/', {parser:customParser})
setInterval(this.flush.bind(this), 5)
}
flush() {
if (this.queue.length) {
for (let msg of this.queue) {
this.socket.emit(...msg)
}
this.queue = []
}
}
send() {
this.queue.push(arguments)
this.socket.emit(...arguments)
}