Files
js-libp2p/README.md
Jacob Heun 80cdbada75 chore: update lead maintainer
chore: update deps

test: fix usage of latest switch

test: change ping self test as its not supported anymore

chore: use package.files instead of .npmignore
2018-11-09 18:35:00 +01:00

1.3 KiB

libp2p-ping JavaScript Implementation

Coverage Status Dependency Status Travis CI Circle CI

IPFS ping protocol JavaScript implementation

Lead Maintainer

Jacob Heun

Usage

var Ping = require('libp2p-ping')

Ping.mount(swarm) // Enable this peer to echo Ping requests

var p = new Ping(swarm, peerDst) // Ping peerDst, peerDst must be a peer-info object

p.on('ping', function (time) {
  console.log(time + 'ms')
  p.stop() // stop sending pings
})

p.start()