Skip to content

Commit

Permalink
fix: add deprecation warning to mplex
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Sep 11, 2024
1 parent 6c7bd45 commit 3b43a37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/stream-multiplexer-mplex/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ class Mplex implements StreamMuxerFactory {
}
}

/**
* @deprecated mplex is deprecated as it has no flow control. Please use yamux instead.
*/
export function mplex (init: MplexInit = {}): (components: MplexComponents) => StreamMuxerFactory {
return (components) => new Mplex(components, init)
}

0 comments on commit 3b43a37

Please sign in to comment.