We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e18493 commit 97b4ca0Copy full SHA for 97b4ca0
p2p/transport/webrtc/transport.go
@@ -177,6 +177,11 @@ func (t *WebRTCTransport) CanDial(addr ma.Multiaddr) bool {
177
return dialMatcher.Matches(addr)
178
}
179
180
+// Listen returns a listener for addr.
181
+//
182
+// The IP, Port combination for addr must be exclusive to this listener as a WebRTC listener cannot
183
+// be multiplexed on the same port as other UDP based transports like QUIC and WebTransport.
184
+// See https://github.com/libp2p/go-libp2p/issues/2446 for details.
185
func (t *WebRTCTransport) Listen(addr ma.Multiaddr) (tpt.Listener, error) {
186
addr, wrtcComponent := ma.SplitLast(addr)
187
isWebrtc := wrtcComponent.Equal(webrtcComponent)
0 commit comments