mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
Put SCTP Zero Checksum behind SettingEngine
Old versions of Pion break against it
This commit is contained in:
@@ -75,6 +75,7 @@ type SettingEngine struct {
|
||||
}
|
||||
sctp struct {
|
||||
maxReceiveBufferSize uint32
|
||||
enableZeroChecksum bool
|
||||
}
|
||||
sdpMediaLevelFingerprints bool
|
||||
answeringDTLSRole DTLSRole
|
||||
@@ -434,3 +435,10 @@ func (e *SettingEngine) SetDTLSKeyLogWriter(writer io.Writer) {
|
||||
func (e *SettingEngine) SetSCTPMaxReceiveBufferSize(maxReceiveBufferSize uint32) {
|
||||
e.sctp.maxReceiveBufferSize = maxReceiveBufferSize
|
||||
}
|
||||
|
||||
// SetSCTPZeroChecksum enables the zero checksum feature in SCTP.
|
||||
// This removes the need to checksum every incoming/outgoing packet and will reduce
|
||||
// latency and CPU usage. This feature is not backwards compatible so is disabled by default
|
||||
func (e *SettingEngine) EnableSCTPZeroChecksum(isEnabled bool) {
|
||||
e.sctp.enableZeroChecksum = isEnabled
|
||||
}
|
||||
|
Reference in New Issue
Block a user