This commit is contained in:
Raven Scott
2026-05-20 22:28:59 -04:00
parent 341542f41b
commit e4400872c0
82 changed files with 2533 additions and 775 deletions
@@ -2,7 +2,11 @@ require('bare-process/global')
const { HyperP2PTopicChannel } = require('../index.js')
async function main () {
const m = new HyperP2PTopicChannel()
console.log('[scaffold]', m.getStats())
const ch = new HyperP2PTopicChannel({ retainMessages: true })
ch.subscribe('demo', (m) => console.log('[topic-channel]', m))
ch.publish('demo', { hello: 'wave9' }, { retain: true })
console.log(ch.getStats())
await ch.close()
}
main().catch(console.error)