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 {
121121 BlockWrite : r .api .settingEngine .detach .DataChannels && r .api .settingEngine .dataChannelBlockWrite ,
122122 MaxMessageSize : maxMessageSize ,
123123 MTU : outboundMTU ,
124+ MinCwnd : r .api .settingEngine .sctp .minCwnd ,
125+ FastRtxWnd : r .api .settingEngine .sctp .fastRtxWnd ,
126+ CwndCAStep : r .api .settingEngine .sctp .cwndCAStep ,
124127 })
125128 if err != nil {
126129 return err
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ type SettingEngine struct {
8484 enableZeroChecksum bool
8585 rtoMax time.Duration
8686 maxMessageSize uint32
87+ minCwnd uint32
88+ fastRtxWnd uint32
89+ cwndCAStep uint32
8790 }
8891 sdpMediaLevelFingerprints bool
8992 answeringDTLSRole DTLSRole
@@ -525,6 +528,22 @@ func (e *SettingEngine) SetSCTPRTOMax(rtoMax time.Duration) {
525528 e .sctp .rtoMax = rtoMax
526529}
527530
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+
528547// SetICEBindingRequestHandler sets a callback that is fired on a STUN BindingRequest
529548// This allows users to do things like
530549// - Log incoming Binding Requests for debugging
You can’t perform that action at this time.
0 commit comments