Skip to content

Commit d4c5966

Browse files
committed
feat: expose mplex ID as a constant
1 parent 34fca15 commit d4c5966

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

p2p/muxer/mplex/transport.go

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
// DefaultTransport has default settings for Transport
1212
var DefaultTransport = &Transport{}
1313

14+
const ID = "/mplex/6.7.0"
15+
1416
var _ network.Multiplexer = &Transport{}
1517

1618
// Transport implements mux.Multiplexer that constructs

test-plans/cmd/ping/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func main() {
9494
case "yamux":
9595
options = append(options, libp2p.Muxer(yamux.ID, yamux.DefaultTransport))
9696
case "mplex":
97-
options = append(options, libp2p.Muxer("/mplex/6.7.0", mplex.DefaultTransport))
97+
options = append(options, libp2p.Muxer(mplex.ID, mplex.DefaultTransport))
9898
case "quic":
9999
default:
100100
log.Fatalf("Unsupported muxer: %s", muxer)

0 commit comments

Comments
 (0)