mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-21 06:31:22 +00:00
update readme and package.json
This commit is contained in:
parent
f309d4f7b7
commit
348615b5aa
12
README.md
12
README.md
@ -1,9 +1,9 @@
|
||||
libp2p-swarm Node.js implementation
|
||||
=================================
|
||||
libp2p-swarm JavaScript implementation
|
||||
======================================
|
||||
|
||||
[](http://ipn.io) [](http://ipfs.io/) [](http://webchat.freenode.net/?channels=%23ipfs) [](https://travis-ci.org/diasdavid/node-ipfs-swarm)
|
||||
[](http://ipn.io) [](http://ipfs.io/) [](http://webchat.freenode.net/?channels=%23ipfs) [](https://travis-ci.org/diasdavid/js-ipfs-swarm)
|
||||
|
||||
> libp2p swarm implementation in Node.js
|
||||
> libp2p swarm implementation in JavaScript
|
||||
|
||||
# Description
|
||||
|
||||
@ -29,11 +29,11 @@ var Swarm = require('libp2p-swarm')
|
||||
var sw = new Swarm(peerInfoSelf)
|
||||
```
|
||||
|
||||
peerInfoSelf is a [PeerInfo](https://github.com/diasdavid/node-peer-info) object that represents the peer creating this swarm instance.
|
||||
peerInfoSelf is a [PeerInfo](https://github.com/diasdavid/js-peer-info) object that represents the peer creating this swarm instance.
|
||||
|
||||
### Support a transport
|
||||
|
||||
libp2p-swarm expects transports that implement [abstract-transport](https://github.com/diasdavid/abstract-transport). For example [libp2p-tcp](https://github.com/diasdavid/node-libp2p-tcp), a simple shim on top of the `net` module to make it work with swarm expectations.
|
||||
libp2p-swarm expects transports that implement [abstract-transport](https://github.com/diasdavid/abstract-transport). For example [libp2p-tcp](https://github.com/diasdavid/js-libp2p-tcp), a simple shim on top of the `net` module to make it work with swarm expectations.
|
||||
|
||||
```JavaScript
|
||||
sw.addTransport(transport, [options, dialOptions, listenOptions])
|
||||
|
Loading…
x
Reference in New Issue
Block a user