You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-18 16:16:35 +09:00
Throttling config fixed
This commit is contained in:
@@ -343,30 +343,30 @@ namespace Lidgren.Network
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the number of allowed bytes to be sent per second per connection; 0 means unlimited
|
/// Gets or sets the number of allowed bytes to be sent per second per connection; 0 means unlimited (throttling disabled)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ThrottleBytesPerSecond
|
public int ThrottleBytesPerSecond
|
||||||
{
|
{
|
||||||
get { return m_throttleBytesPerSecond; }
|
get { return m_throttleBytesPerSecond; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_throttleBytesPerSecond = value;
|
if (m_throttleBytesPerSecond != 0 && m_throttleBytesPerSecond < m_maximumTransmissionUnit)
|
||||||
if (m_throttleBytesPerSecond < m_maximumTransmissionUnit)
|
|
||||||
throw new NetException("ThrottleBytesPerSecond can not be lower than MaximumTransmissionUnit");
|
throw new NetException("ThrottleBytesPerSecond can not be lower than MaximumTransmissionUnit");
|
||||||
|
m_throttleBytesPerSecond = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the peak number of bytes sent before throttling kicks in
|
/// Gets or sets the peak number of bytes sent before throttling kicks in, if enabled
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ThrottlePeakBytes
|
public int ThrottlePeakBytes
|
||||||
{
|
{
|
||||||
get { return m_throttlePeakBytes; }
|
get { return m_throttlePeakBytes; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_throttlePeakBytes = value;
|
|
||||||
if (m_throttlePeakBytes < m_maximumTransmissionUnit)
|
if (m_throttlePeakBytes < m_maximumTransmissionUnit)
|
||||||
throw new NetException("ThrottlePeakBytes can not be lower than MaximumTransmissionUnit");
|
throw new NetException("ThrottlePeakBytes can not be lower than MaximumTransmissionUnit");
|
||||||
|
m_throttlePeakBytes = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user