anternet-channel

    0.1.1 • Public • Published

    anternet-channel.js

    build npm Join the chat at https://gitter.im/Anternet/anternet.js npm

    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

    Install

    npm i anternet-channel

    DownloadsWeekly Downloads

    5

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • moshe