docs: update echo and chat examples to use libp2p-switch (#174)

This commit is contained in:
Zane Starr
2018-03-06 04:25:55 -08:00
committed by David Dias
parent e531b1bf3d
commit 2e40e9dda1
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ series([
listenerPeerInfo.multiaddrs.add('/ip4/0.0.0.0/tcp/10333')
listenerNode = new Node(listenerPeerInfo)
listenerNode.swarm.on('peer-mux-established', (peerInfo) => {
listenerNode.switch.on('peer-mux-established', (peerInfo) => {
console.log('received dial to me from:', peerInfo.id.toB58String())
})