Skip to content

Commit

Permalink
docs: document new events
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Mar 29, 2017
1 parent df4c99d commit 8840c9b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,24 @@ class Node extends libp2p {
- `protocol`: String that defines the protocol (e.g '/ipfs/bitswap/1.1.0')

#### `libp2p.on('peer', (peer) => {})`
#### `libp2p.on('peer:discovery', (peer) => {})`

> Peer has been discovered.
- `peer`: instance of [PeerInfo][]

#### `libp2p.on('peer:connect', (peer) => {})`

> We connected to a new peer
- `peer`: instance of [PeerInfo][]

#### `libp2p.on('peer:disconnect', (peer) => {})`

> We disconnected from Peer
- `peer`: instance of [PeerInfo][]

#### `libp2p.isOn()`

> Check if libp2p is started
Expand Down

0 comments on commit 8840c9b

Please sign in to comment.