-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
streammuxer order changes behaviour #246
Comments
Muxers are negotiated during multistream select. I think this needs a documentation update to say that the order that muxers are configured in affects which muxer is chosen (typically the first in the list). A section should be added to Stream Multiplexing in the configuration docs. |
Bumps [@libp2p/interface-mocks](https://github.com/libp2p/js-libp2p-interfaces) from 8.0.5 to 9.1.1. - [Release notes](https://github.com/libp2p/js-libp2p-interfaces/releases) - [Commits](https://github.com/libp2p/js-libp2p-interfaces/compare/@libp2p/interface-mocks-v8.0.5...@libp2p/interface-mocks-v9.1.1) --- updated-dependencies: - dependency-name: "@libp2p/interface-mocks" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## [6.1.2](libp2p/js-libp2p-tcp@v6.1.1...v6.1.2) (2023-02-01) ### Dependencies * **dev:** bump @libp2p/interface-mocks from 8.0.5 to 9.1.1 ([libp2p#246](libp2p/js-libp2p-tcp#246)) ([6f01bd1](libp2p/js-libp2p-tcp@6f01bd1)) * **dev:** bump aegir from 37.12.1 to 38.1.0 ([libp2p#243](libp2p/js-libp2p-tcp#243)) ([e7eea28](libp2p/js-libp2p-tcp@e7eea28))
While following the example of how to do a basic libp2p setup, if we only configure webSockets as our [transport](https://github.com/libp2p/js-libp2p/blob/master/doc/GETTING_STARTED.md#transports) the types will be undefined. ```bash node_modules/@libp2p/websockets/dist/src/index.d.ts:5:36 - error TS7016: Could not find a declaration file for module 'ws'. '/Users/horizon/Desktop/test/node_modules/ws/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';` 5 import type { ClientOptions } from 'ws'; ~~~~ ``` Perhaps these types should be exported in a better way? Especially since they are required in [it-ws](https://www.npmjs.com/package/it-ws) but if so then maybe the are not properly [exported there](https://github.com/alanshaw/it-ws/blob/master/package.json#L50) ```bash node_modules/it-ws/dist/src/client.d.ts:1:36 - error TS7016: Could not find a declaration file for module 'ws'. '/Users/horizon/Desktop/test/node_modules/ws/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';` 1 import type { ClientOptions } from 'ws'; ~~~~ node_modules/it-ws/dist/src/duplex.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ws'. 1 /// <reference types="ws" /> ~~ node_modules/it-ws/dist/src/sink.d.ts:1:32 - error TS7016: Could not find a declaration file for module 'ws'. '/Users/horizon/Desktop/test/node_modules/ws/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';` 1 import type { WebSocket } from 'ws'; ~~~~ node_modules/it-ws/dist/src/web-socket.d.ts:1:23 - error TS7016: Could not find a declaration file for module 'ws'. '/Users/horizon/Desktop/test/node_modules/ws/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/ws` if it exists or add a new declaration (.d.ts) file containing `declare module 'ws';` 1 import WebSocket from 'ws'; ~~~~ ```
## [6.0.2](libp2p/js-libp2p-websockets@v6.0.1...v6.0.2) (2023-06-06) ### Dependencies * add ws types to main dependencies ([libp2p#246](libp2p/js-libp2p-websockets#246)) ([628e260](libp2p/js-libp2p-websockets@628e260)), closes [/github.com/alanshaw/it-ws/blob/master/package.json#L50](https://github.com/libp2p//github.com/alanshaw/it-ws/blob/master/package.json/issues/L50)
Type: Bug
Severity: High
Description:
When sending data > 8k to a client it gets chunked into 8k blocks when the
streamMuxer
is set to[ spdy, mplex ]
. If it is set to[ mplex, spdy ]
it works as expected and the client receives the full block.So the order of the stream muxers matter.
Steps to reproduce the error:
Checkout the repo at https://github.com/vmx/libp2p-streammuxer-bug and follow the instructions in the README.
The text was updated successfully, but these errors were encountered: