Expand pear, encoding, consensus, supercomputer, and CRDT modules
Add manual API helpers across categories: pear link resolver cache, applink reload, storage layout defaults, compact codec decodeBatch, schema allValid/getSchema, session bridge removePair, udx sendRecvRatio, cluster affinity and cpu-share clearAll, raft truncateLog/currentTerm, quorum vote tally, silence and whisper seen helpers, qos unsubscribeAll, LWW register clearAll, peer selector topRegions, graph hasPath, fork choice clearViews, and trust gate untrustAll. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -64,6 +64,16 @@ class HyperP2PSessionBridge extends EventEmitter {
|
||||
|
||||
pairCount () { return this._tokens.size }
|
||||
|
||||
async removePair (token) {
|
||||
const entry = this._tokens.get(token)
|
||||
if (!entry) return false
|
||||
try { await entry.initiator.destroy() } catch (_) {}
|
||||
try { await entry.responder.destroy() } catch (_) {}
|
||||
this._tokens.delete(token)
|
||||
this.emit('pair-removed', { token })
|
||||
return true
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user