Skip to content

Commit

Permalink
webrtc: clarify that there is no reuseport functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Nov 22, 2023
1 parent 3089ac3 commit 7adf2dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions p2p/transport/webrtc/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ func (t *WebRTCTransport) CanDial(addr ma.Multiaddr) bool {
return dialMatcher.Matches(addr)
}

// Listen returns a listener for addr.
//
// The IP, Port combination for addr must be exclusive to this listener as a WebRTC listener cannot
// be multiplexed on the same port as other UDP based transports like QUIC and WebTransport. see
// https://github.com/libp2p/go-libp2p/issues/2446 for details
func (t *WebRTCTransport) Listen(addr ma.Multiaddr) (tpt.Listener, error) {
addr, wrtcComponent := ma.SplitLast(addr)
isWebrtc := wrtcComponent.Equal(webrtcComponent)
Expand Down

0 comments on commit 7adf2dc

Please sign in to comment.