Naughty Program Manipulator

    anternet-broadcast

    0.1.1 • Public • Published

    anternet-broadcast.js

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

    Anternet library for broadcast messages to other peers that listening on the same channel.

    Example

    const Anternet = require('anternet');
    const Broadcast = require('anternet-broadcast');
     
    const msg = {a: 'Hello world', foo: 'bar'};
                  
    const anternet = new Anternet();
    const broadcast = Broadcast.generate();
     
    console.log(broadcast.publicKey); // print broadcast id string
     
    // send messages to a given peer
    const address = '127.0.0.1';
    const port = 12345;
    broadcast.send(anternet, msg, port, address);

    License

    MIT License. Copyright © 2016 Moshe Simantov

    Install

    npm i anternet-broadcast

    DownloadsWeekly Downloads

    5

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • moshe