anternet-peer
v0.1.0
Published
Anternet peer extension.
Downloads
14
Readme
anternet-peer.js
Anternet peer extension.
Example
const Anternet = require('anternet');
const Peer = require('anternet-peer');
const anternet = new Anternet();
Peer.extend(anternet);
const address = '127.0.0.1';
const port = 12345;
const peer = new Peer(port, address);
// send peer on request
anternet.request(msgType, [peer], 123123, '127.0.0.1');
// send peer on response
anternet.response(rid, [peer], 123123, '127.0.0.1');
License
MIT License. Copyright © 2016 Moshe Simantov