mirror of
https://github.com/pion/webrtc.git
synced 2025-10-19 05:24:50 +08:00
Remove unused member in SCTPTransport
RTOMax wasn't actually being stored, is being pulled directly from SettingEngine
This commit is contained in:
@@ -58,8 +58,6 @@ type SCTPTransport struct {
|
|||||||
|
|
||||||
api *API
|
api *API
|
||||||
log logging.LeveledLogger
|
log logging.LeveledLogger
|
||||||
// maximum retransmission timeout
|
|
||||||
rtoMax float64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSCTPTransport creates a new SCTPTransport.
|
// NewSCTPTransport creates a new SCTPTransport.
|
||||||
@@ -107,13 +105,12 @@ func (r *SCTPTransport) Start(SCTPCapabilities) error {
|
|||||||
if dtlsTransport == nil || dtlsTransport.conn == nil {
|
if dtlsTransport == nil || dtlsTransport.conn == nil {
|
||||||
return errSCTPTransportDTLS
|
return errSCTPTransportDTLS
|
||||||
}
|
}
|
||||||
rtoMax := float64(r.api.settingEngine.sctp.rtoMax) / float64(time.Millisecond)
|
|
||||||
sctpAssociation, err := sctp.Client(sctp.Config{
|
sctpAssociation, err := sctp.Client(sctp.Config{
|
||||||
NetConn: dtlsTransport.conn,
|
NetConn: dtlsTransport.conn,
|
||||||
MaxReceiveBufferSize: r.api.settingEngine.sctp.maxReceiveBufferSize,
|
MaxReceiveBufferSize: r.api.settingEngine.sctp.maxReceiveBufferSize,
|
||||||
EnableZeroChecksum: r.api.settingEngine.sctp.enableZeroChecksum,
|
EnableZeroChecksum: r.api.settingEngine.sctp.enableZeroChecksum,
|
||||||
LoggerFactory: r.api.settingEngine.LoggerFactory,
|
LoggerFactory: r.api.settingEngine.LoggerFactory,
|
||||||
RTOMax: rtoMax,
|
RTOMax: float64(r.api.settingEngine.sctp.rtoMax) / float64(time.Millisecond),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@@ -434,7 +434,7 @@ func (e *SettingEngine) SetSCTPMaxReceiveBufferSize(maxReceiveBufferSize uint32)
|
|||||||
e.sctp.maxReceiveBufferSize = maxReceiveBufferSize
|
e.sctp.maxReceiveBufferSize = maxReceiveBufferSize
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetSCTPZeroChecksum enables the zero checksum feature in SCTP.
|
// EnableSCTPZeroChecksum controls the zero checksum feature in SCTP.
|
||||||
// This removes the need to checksum every incoming/outgoing packet and will reduce
|
// 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
|
// latency and CPU usage. This feature is not backwards compatible so is disabled by default
|
||||||
func (e *SettingEngine) EnableSCTPZeroChecksum(isEnabled bool) {
|
func (e *SettingEngine) EnableSCTPZeroChecksum(isEnabled bool) {
|
||||||
|
Reference in New Issue
Block a user