anternet-channel
v0.1.1
Published
Anternet library for listening to broadcasts form other peers.
Downloads
6
Maintainers
Readme
anternet-channel.js
Anternet library for listening to broadcasts form other peers.
Example
const Anternet = require('anternet');
const Channel = require('anternet-channel');
// put here the publicKey generated from broadcast library
const publicKey = '<< broadcast.publicKey >>';
const anternet = new Anternet();
const channel = new Channel(publicKey);
channel.listen(anternet, (msg, rinfo) => {
console.log(`got broadcast from [${rinfo.address}:${rinfo.port}]: `, msg);
});
License
MIT License. Copyright © 2016 Moshe Simantov