mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-25 18:22:30 +00:00
Adds README stub.
This commit is contained in:
parent
d582fb5f61
commit
3c6bce9d28
58
README.md
58
README.md
@ -11,6 +11,60 @@ js-libp2p-tcp
|
|||||||

|

|
||||||

|

|
||||||
|
|
||||||
> Node.js implementation of the TCP module that libp2p uses, which implements the [interface-connection](https://github.com/diasdavid/interface-connection) interface for dial/listen.
|
> Node.js implementation of the TCP module that libp2p uses, which implements
|
||||||
|
> the [interface-connection](https://github.com/diasdavid/interface-connection)
|
||||||
|
> interface for dial/listen.
|
||||||
|
|
||||||
note: libp2p-tcp in Node.js is a very thin shim that adds the support to dial to a `multiaddr`. This small shim will enable libp2p to use other different transports.
|
## Description
|
||||||
|
|
||||||
|
`libp2p-tcp` in Node.js is a very thin shim that adds the support to dial to a
|
||||||
|
`multiaddr`. This small shim will enable libp2p to use other different
|
||||||
|
transports.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```js
|
||||||
|
```
|
||||||
|
|
||||||
|
outputs
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### npm
|
||||||
|
|
||||||
|
```sh
|
||||||
|
> npm i libp2p-tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
```js
|
||||||
|
const Tcp = require('libp2p-tcp')
|
||||||
|
```
|
||||||
|
|
||||||
|
### var tcp = new Tcp()
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
### tcp.dial(multiaddr, options)
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
### tcp.createListener(multiaddrs, handler, callback)
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
### tcp.close(callback)
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
### tcp.filter(multiaddrs)
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user