This commit is contained in:
David Dias 2015-09-16 12:35:18 +01:00
parent 470d8bfc6a
commit f70b1d42e0
3 changed files with 28 additions and 5 deletions

View File

@ -1,2 +1,8 @@
# node-libp2p-tcp node-libp2p-tcp
Node.js implementation of the TCP module that libp2p uses, which implements the abstract-connection interface ===============
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) ![Build Status](https://travis-ci.org/diasdavid/node-libp2p-tcp.svg?style=flat-square)](https://travis-ci.org/diasdavid/node-libp2p-tcp) ![](https://img.shields.io/badge/coverage-%3F-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/diasdavid/node-libp2p-tcp.svg?style=flat-square)](https://david-dm.org/diasdavid/node-libp2p-tcp) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
> Node.js implementation of the TCP module that libp2p uses, which implements the [abstract-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.

View File

@ -4,10 +4,9 @@
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the abstract-connection interface", "description": "Node.js implementation of the TCP module that libp2p uses, which implements the abstract-connection interface",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "node tests/test-ac.js"
}, },
"pre-commit": [ "pre-commit": [],
],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/diasdavid/node-libp2p-tcp.git" "url": "https://github.com/diasdavid/node-libp2p-tcp.git"
@ -22,8 +21,12 @@
}, },
"homepage": "https://github.com/diasdavid/node-libp2p-tcp", "homepage": "https://github.com/diasdavid/node-libp2p-tcp",
"devDependencies": { "devDependencies": {
"abstract-connection": "^0.1.0",
"pre-commit": "^1.1.1", "pre-commit": "^1.1.1",
"standard": "^5.2.2", "standard": "^5.2.2",
"tape": "^4.2.0" "tape": "^4.2.0"
},
"dependencies": {
"multiaddr": "^1.0.0"
} }
} }

View File

@ -0,0 +1,14 @@
var tape = require('tape')
var tests = require('abstract-connection/tests')
var conn = require('../src')
var common = {
setup: function (t, cb) {
cb(null, conn)
},
teardown: function (t, cb) {
cb()
}
}
tests(tape, common)