Don't read new frames before the previous frame has been sent.

This commit is contained in:
Simo Kinnunen
2015-04-17 17:21:38 +09:00
parent 07fb3b530c
commit feb77c4396
3 changed files with 97 additions and 48 deletions

View File

@@ -31,9 +31,9 @@ BroadcastSet.prototype.remove = function(id) {
}
}
BroadcastSet.prototype.each = function(fn) {
return Object.keys(this.set).forEach(function(id) {
return fn(this.set[id])
BroadcastSet.prototype.values = function() {
return Object.keys(this.set).map(function(id) {
return this.set[id]
}, this)
}