Updates
This commit is contained in:
@@ -4,7 +4,7 @@ const { HyperP2PTopicChannel } = require('../index.js')
|
||||
async function main () {
|
||||
const ch = new HyperP2PTopicChannel({ retainMessages: true })
|
||||
ch.subscribe('demo', (m) => console.log('[topic-channel]', m))
|
||||
ch.publish('demo', { hello: 'wave9' }, { retain: true })
|
||||
ch.publish('demo', { hello: 'demo' }, { retain: true })
|
||||
console.log(ch.getStats())
|
||||
await ch.close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user