feat(media,messaging,network): deepen streaming and transport APIs
Hyper-P2P Module Tests / unit-all (push) Failing after 1h16m23s
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:
@@ -79,6 +79,23 @@ class HyperP2PTopicChannel extends EventEmitter {
|
||||
|
||||
retainedCount () { return this._retained.size }
|
||||
|
||||
clearRetained (channel) {
|
||||
if (channel) return this._retained.delete(String(channel))
|
||||
const n = this._retained.size
|
||||
this._retained.clear()
|
||||
return n
|
||||
}
|
||||
|
||||
publishBatch (channel, payloads) {
|
||||
assertNonEmpty(channel, 'channel')
|
||||
if (!Array.isArray(payloads)) throw new Error('payloads array required')
|
||||
return payloads.map((p) => this.publish(channel, p))
|
||||
}
|
||||
|
||||
subscriberCount () {
|
||||
return this._subs.size
|
||||
}
|
||||
|
||||
_deliverLocal (channel, payload, meta) {
|
||||
const handler = this._subs.get(channel)
|
||||
if (handler) {
|
||||
|
||||
Reference in New Issue
Block a user