C# Class Squishy.Network.TrafficWatch

This class is required for Connection throtteling. When active, a thread will poll all given throttles every PollSpan. That means calculating an exact current speed of all their Connections and continue transfer of all throttled connections.
Datei anzeigen Open project: jaddie/WCell-Utility-Bot

Public Methods

Method Description
Add ( Throttle throttle ) : void

Adds a new Throttle.

AddDownloadThrottle ( int maxDownBps ) : Throttle

Adds and returns a new SetThrottle which will restrict the total download speed of all its connections to the given value. Initial connections of the new throttle.

AddThrottle ( int maxUpBps, int maxDownBps ) : Throttle

Adds and returns a new SetThrottle which will restrict the total download speed and upload speeds of all its connections to the given values. Initial connections of the new throttle.

AddUploadThrottle ( int maxUpBps ) : Throttle

Adds and returns a new SetThrottle which will restrict the total upload speed of all its connections to the given value. Initial connections of the new throttle.

GetThrottle ( int index ) : Throttle
Remove ( Throttle throttle ) : void

Removes the given Throttle or does nothing if its not Active.

Remove ( int index ) : void
RemoveAll ( ) : void

Removes all Throttles.

Private Methods

Method Description
PollAll ( ) : void
WaitPoll ( ) : void

Method Details

Add() public static method

Adds a new Throttle.
public static Add ( Throttle throttle ) : void
throttle Throttle
return void

AddDownloadThrottle() public static method

Adds and returns a new SetThrottle which will restrict the total download speed of all its connections to the given value. Initial connections of the new throttle.
public static AddDownloadThrottle ( int maxDownBps ) : Throttle
maxDownBps int
return Throttle

AddThrottle() public static method

Adds and returns a new SetThrottle which will restrict the total download speed and upload speeds of all its connections to the given values. Initial connections of the new throttle.
public static AddThrottle ( int maxUpBps, int maxDownBps ) : Throttle
maxUpBps int
maxDownBps int
return Throttle

AddUploadThrottle() public static method

Adds and returns a new SetThrottle which will restrict the total upload speed of all its connections to the given value. Initial connections of the new throttle.
public static AddUploadThrottle ( int maxUpBps ) : Throttle
maxUpBps int
return Throttle

GetThrottle() public static method

public static GetThrottle ( int index ) : Throttle
index int
return Throttle

Remove() public static method

Removes the given Throttle or does nothing if its not Active.
public static Remove ( Throttle throttle ) : void
throttle Throttle
return void

Remove() public static method

public static Remove ( int index ) : void
index int
return void

RemoveAll() public static method

Removes all Throttles.
public static RemoveAll ( ) : void
return void