* Optimized usings

* shortened references
* Removed redundant 'this'
* Normalized EOF
This commit is contained in:
lbsa71
2007-12-27 21:41:48 +00:00
parent d508d77122
commit efd90b56b7
277 changed files with 4685 additions and 4408 deletions

View File

@@ -25,26 +25,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Timers;
using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using Timer=System.Timers.Timer;
namespace OpenSim.Region.ClientStack
{
public class PacketThrottle
{
private int max; // max allowable throttle
private int min; // min allowable throttle
private int throttle; // current throttle setting
@@ -63,10 +47,10 @@ namespace OpenSim.Region.ClientStack
{
sent = 0;
}
public bool UnderLimit()
{
return (sent < (throttle / divisor));
return (sent < (throttle/divisor));
}
public int Add(int bytes)
@@ -78,27 +62,32 @@ namespace OpenSim.Region.ClientStack
// Properties
public int Max
{
get {return max;}
get { return max; }
}
public int Min
{
get {return min;}
get { return min; }
}
public int Throttle
{
get {return throttle;}
set
get { return throttle; }
set
{
if (value > max) {
if (value > max)
{
throttle = max;
} else if (value < min) {
}
else if (value < min)
{
throttle = min;
} else {
}
else
{
throttle = value;
}
}
}
}
}
}