mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-01 12:31:05 +00:00
update name
This commit is contained in:
parent
8802fa0ec0
commit
e469f666c4
12
README.md
12
README.md
@ -1,4 +1,4 @@
|
||||
abstract-stream-muxer
|
||||
interface-stream-muxer
|
||||
=====================
|
||||
|
||||
[](http://ipn.io) [](http://webchat.freenode.net/?channels=%23ipfs)
|
||||
@ -21,7 +21,7 @@ Send a PR to add a new one if you happen to find or write one.
|
||||
|
||||
# Badge
|
||||
|
||||
Include this badge in your readme if you make a new module that uses abstract-stream-muxer API.
|
||||
Include this badge in your readme if you make a new module that uses interface-stream-muxer API.
|
||||
|
||||

|
||||
|
||||
@ -29,11 +29,11 @@ Include this badge in your readme if you make a new module that uses abstract-st
|
||||
|
||||
## Node.js
|
||||
|
||||
Install abstract-stream-muxer as one of the dependencies of your project and as a test file, using `tap`, `tape` or a test runner with compatible API, do:
|
||||
Install interface-stream-muxer as one of the dependencies of your project and as a test file, using `tap`, `tape` or a test runner with compatible API, do:
|
||||
|
||||
```
|
||||
var tape = require('tape')
|
||||
var tests = require('abstract-stream-muxer/tests')
|
||||
var tests = require('interface-stream-muxer/tests')
|
||||
var YourStreamMuxer = require('../src')
|
||||
|
||||
var common = {
|
||||
@ -69,7 +69,7 @@ If `err` is passed, no operation should be made in `conn`.
|
||||
|
||||
`isListener` is a bool that tells the side of the socket we are, `isListener = true` for listener/server and `isListener = false` for dialer/client side.
|
||||
|
||||
`conn` abstracts our established Connection with the other endpoint, it must offer an interface to open a stream inside this connection and to receive incomming stream requests.
|
||||
`conn` interfaces our established Connection with the other endpoint, it must offer an interface to open a stream inside this connection and to receive incomming stream requests.
|
||||
|
||||
### Dial(open/create) a new stream
|
||||
|
||||
@ -81,7 +81,7 @@ This method negotiates and opens a new stream with the other endpoint.
|
||||
|
||||
If `err` is passed, no operation should be made in `stream`.
|
||||
|
||||
`stream` abstract our established Stream with the other endpoint, it must implement the [Duplex Stream interface](https://nodejs.org/api/stream.html#stream_class_stream_duplex) in Node.js or the [ReadWriteCloser](http://golang.org/pkg/io/#ReadWriteCloser) in Go.
|
||||
`stream` interface our established Stream with the other endpoint, it must implement the [Duplex Stream interface](https://nodejs.org/api/stream.html#stream_class_stream_duplex) in Node.js or the [ReadWriteCloser](http://golang.org/pkg/io/#ReadWriteCloser) in Go.
|
||||
|
||||
In the Node.js case, if no callback is passed, stream will emit an 'ready' event when it is prepared or a 'error' event if it fails to establish the connection, until then, it will buffer the 'write' calls.
|
||||
|
||||
|
10
package.json
10
package.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "abstract-stream-muxer",
|
||||
"name": "interface-stream-muxer",
|
||||
"version": "0.2.4",
|
||||
"description": "A test suite and interface you can use to implement a stream muxer.",
|
||||
"main": "src/index.js",
|
||||
@ -11,20 +11,20 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/diasdavid/abstract-stream-muxer.git"
|
||||
"url": "https://github.com/diasdavid/interface-stream-muxer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Streams",
|
||||
"Muxer",
|
||||
"Abstract",
|
||||
"interface",
|
||||
"Interface"
|
||||
],
|
||||
"author": "David Dias <daviddias@ipfs.io>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/diasdavid/abstract-stream-muxer/issues"
|
||||
"url": "https://github.com/diasdavid/interface-stream-muxer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/diasdavid/abstract-stream-muxer",
|
||||
"homepage": "https://github.com/diasdavid/interface-stream-muxer",
|
||||
"dependencies": {
|
||||
"stream-pair": "^1.0.3",
|
||||
"timed-tape": "^0.1.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user