mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-25 10:02:21 +00:00
js-libp2p-tcp
Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection interface for dial/listen.
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
outputs
Installation
npm
> npm i libp2p-tcp
API
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
Description
Languages
JavaScript
100%