Skip to content

Commit

Permalink
feat: expose mplex ID as a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Jan 24, 2023
1 parent 476db9f commit eb2eda8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions p2p/muxer/mplex/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
// DefaultTransport has default settings for Transport
var DefaultTransport = &Transport{}

const ID = "/mplex/6.7.0"

var _ network.Multiplexer = &Transport{}

// Transport implements mux.Multiplexer that constructs
Expand Down
2 changes: 1 addition & 1 deletion test-plans/cmd/ping/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func main() {
case "yamux":
options = append(options, libp2p.Muxer(yamux.ID, yamux.DefaultTransport))
case "mplex":
options = append(options, libp2p.Muxer("/mplex/6.7.0", mplex.DefaultTransport))
options = append(options, libp2p.Muxer(mplex.ID, mplex.DefaultTransport))
case "quic":
default:
log.Fatalf("Unsupported muxer: %s", muxer)
Expand Down

0 comments on commit eb2eda8

Please sign in to comment.