max-mapper / max-mapper/multiplex

Spec Question?

Open
#17 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
143
Forks
25
PR merge metrics
No merged PRs in 30d

Description

the readme says

> `onStream` will be called with `(stream, id)` whenever a new remote sub-stream is created with an id that hasn't already been created with `.createStream`.

curious about "that hasn't already been created". does this mean that if I run the below on two clients:

``` js
conn = getConnection()
mux = multiplex(opts, handler)
stream = mux.createStream("foo")

function handler(stream, id) {
stream.close() // just close all incoming streams
}
```

`stream` for `foo` will be properly connected between the two?

(i'm implementing this in Go for interop happiness)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README passage defining onStream and createStream, then trace the documented behavior for a stream id created on two clients. Confirm the intended interoperability semantics and update the README or provide a definitive clarification so the meaning of “hasn't already been created” is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.