Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

libp2p/js-libp2p-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⛔️ DEPRECATED: libp2p-ping is now included in js-libp2p

libp2p-ping JavaScript Implementation

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