Alex Potsides b25e0fe531
fix: make error codes consistent (#1054)
Sometimes they are `NOT_FOUND`, sometimes `ERR_NOT_FOUND`, etc.

Move all error codes into `errors.js` and reference them from there.
2021-12-07 14:42:10 +00:00
..
2021-08-13 16:21:50 +02:00
2020-01-24 14:40:40 +01:00

libp2p-ping JavaScript Implementation

IPFS ping protocol JavaScript implementation

Note: git history prior to merging into js-libp2p can be found in the original repository, https://github.com/libp2p/js-libp2p-ping.

Usage

var Ping = require('libp2p/src/ping')

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

const latency = await Ping(libp2p, peerDst)

Ping.unmount(libp2p)