Add SetSCTPRTOMax to SettingEngine

Allows the user to cap the retranmission timeout, this change adds
RTOMax to SettingEngine and pass it on when creating the SCTP Assocation
This commit is contained in:
Benny Daon
2024-02-27 14:05:24 +02:00
committed by Sean DuBois
parent 1dbcf67844
commit fb82fff2bc
3 changed files with 20 additions and 1 deletions

View File

@@ -269,3 +269,12 @@ func TestSetSCTPMaxReceiverBufferSize(t *testing.T) {
s.SetSCTPMaxReceiveBufferSize(expSize)
assert.Equal(t, expSize, s.sctp.maxReceiveBufferSize)
}
func TestSetSCTPRTOMax(t *testing.T) {
s := SettingEngine{}
assert.Equal(t, time.Duration(0), s.sctp.rtoMax)
expSize := time.Second
s.SetSCTPRTOMax(expSize)
assert.Equal(t, expSize, s.sctp.rtoMax)
}