mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-30 16:01:59 +00:00
80cdbada75dc359e7544cfbb67e1b05c684d11f4
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
libp2p-ping JavaScript Implementation
IPFS ping protocol JavaScript implementation
Lead Maintainer
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()
Description
Languages
TypeScript
100%