Skip to content

Commit 97b4ca0

Browse files
webrtc: clarify that there is no reuseport functionality (#2652)
Co-authored-by: Marten Seemann <[email protected]>
1 parent 7e18493 commit 97b4ca0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

p2p/transport/webrtc/transport.go

+5
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ func (t *WebRTCTransport) CanDial(addr ma.Multiaddr) bool {
177177
return dialMatcher.Matches(addr)
178178
}
179179

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.
180185
func (t *WebRTCTransport) Listen(addr ma.Multiaddr) (tpt.Listener, error) {
181186
addr, wrtcComponent := ma.SplitLast(addr)
182187
isWebrtc := wrtcComponent.Equal(webrtcComponent)

0 commit comments

Comments
 (0)