File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,9 @@ func (r *SCTPTransport) Start(capabilities SCTPCapabilities) error {
121
121
BlockWrite : r .api .settingEngine .detach .DataChannels && r .api .settingEngine .dataChannelBlockWrite ,
122
122
MaxMessageSize : maxMessageSize ,
123
123
MTU : outboundMTU ,
124
+ MinCwnd : r .api .settingEngine .sctp .minCwnd ,
125
+ FastRtxWnd : r .api .settingEngine .sctp .fastRtxWnd ,
126
+ CwndCAStep : r .api .settingEngine .sctp .cwndCAStep ,
124
127
})
125
128
if err != nil {
126
129
return err
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ type SettingEngine struct {
84
84
enableZeroChecksum bool
85
85
rtoMax time.Duration
86
86
maxMessageSize uint32
87
+ minCwnd uint32
88
+ fastRtxWnd uint32
89
+ cwndCAStep uint32
87
90
}
88
91
sdpMediaLevelFingerprints bool
89
92
answeringDTLSRole DTLSRole
@@ -525,6 +528,22 @@ func (e *SettingEngine) SetSCTPRTOMax(rtoMax time.Duration) {
525
528
e .sctp .rtoMax = rtoMax
526
529
}
527
530
531
+ // SetSCTPMinCwnd sets the minimum congestion window size. The congestion window
532
+ // will not be smaller than this value during congestion control.
533
+ func (e * SettingEngine ) SetSCTPMinCwnd (minCwnd uint32 ) {
534
+ e .sctp .minCwnd = minCwnd
535
+ }
536
+
537
+ // SetSCTPFastRtxWnd sets the fast retransmission window size.
538
+ func (e * SettingEngine ) SetSCTPFastRtxWnd (fastRtxWnd uint32 ) {
539
+ e .sctp .fastRtxWnd = fastRtxWnd
540
+ }
541
+
542
+ // SetSCTPCwndCAStep sets congestion window adjustment step size during congestion avoidance.
543
+ func (e * SettingEngine ) SetSCTPCwndCAStep (cwndCAStep uint32 ) {
544
+ e .sctp .cwndCAStep = cwndCAStep
545
+ }
546
+
528
547
// SetICEBindingRequestHandler sets a callback that is fired on a STUN BindingRequest
529
548
// This allows users to do things like
530
549
// - Log incoming Binding Requests for debugging
You can’t perform that action at this time.
0 commit comments