This package has been deprecated

Author message:

libp2p-ping is now part of libp2p as of libp2p@0.26.1. This module should no longer be used standalone.

libp2p-ping

0.8.5 • Public • Published

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()

Readme

Keywords

Package Sidebar

Install

npm i libp2p-ping

Weekly Downloads

1,327

Version

0.8.5

License

MIT

Unpacked Size

5.18 MB

Total Files

13

Last publish

Collaborators

  • daviddias
  • jacobheun