Skip to content

Commit

Permalink
webrtcprivate: set receive MTU size
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Oct 16, 2023
1 parent 6b6aa51 commit 6488051
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions p2p/transport/webrtcprivate/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
const (
name = "webrtcprivate"
maxMsgSize = 4096
receiveMTU = 1500
connectTimeout = time.Minute
SignalingProtocol = "/webrtc-signaling"
disconnectedTimeout = 20 * time.Second
Expand Down Expand Up @@ -458,6 +459,7 @@ func (t *transport) NewPeerConnection() (*webrtc.PeerConnection, error) {
s.SetICETimeouts(disconnectedTimeout, failedTimeout, keepaliveTimeout)
s.DetachDataChannels()
s.SetIncludeLoopbackCandidate(true)
s.SetReceiveMTU(receiveMTU)
api := webrtc.NewAPI(webrtc.WithSettingEngine(s))
return api.NewPeerConnection(t.webrtcConfig)
}
Expand Down

0 comments on commit 6488051

Please sign in to comment.