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.
Afficher le fichier Open project: jaddie/WCell-Utility-Bot

Méthodes publiques

Méthode 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

Méthode Description
PollAll ( ) : void
WaitPoll ( ) : void

Method Details

Add() public static méthode

Adds a new Throttle.
public static Add ( Throttle throttle ) : void
throttle Throttle
Résultat void

AddDownloadThrottle() public static méthode

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
Résultat Throttle

AddThrottle() public static méthode

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
Résultat Throttle

AddUploadThrottle() public static méthode

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
Résultat Throttle

GetThrottle() public static méthode

public static GetThrottle ( int index ) : Throttle
index int
Résultat Throttle

Remove() public static méthode

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

Remove() public static méthode

public static Remove ( int index ) : void
index int
Résultat void

RemoveAll() public static méthode

Removes all Throttles.
public static RemoveAll ( ) : void
Résultat void