feat(media,messaging,network): deepen streaming and transport APIs
Hyper-P2P Module Tests / unit-all (push) Failing after 1h16m23s

Origin hybrid weighted select, latency path stats, live-edge listing;
topic channel batch publish and retained clear; wakeup reschedule and
cancelAll; electron bridge handler registry helpers.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:25:52 -04:00
co-authored by Cursor
parent cce695e34a
commit c8f09d914c
6 changed files with 106 additions and 0 deletions
@@ -57,6 +57,21 @@ class HyperP2PLatencyOptimizer extends EventEmitter {
return [...this._paths.keys()]
}
clearPath (pathId) {
return this._paths.delete(String(pathId))
}
averageRtt () {
const vals = [...this._paths.values()]
if (!vals.length) return 0
return vals.reduce((s, p) => s + p.rttMs, 0) / vals.length
}
isWithinTarget (plan) {
const glass = plan?.estimatedGlassMs ?? this.averageRtt() + 200
return glass <= this.targetGlassMs
}
getStats () {
return mediaStats(this._stats, PROTOCOL, { paths: this._paths.size })
}