C# Class NetworkCommsDotNet.Tools.HostInfo.IP

Host IP information
ファイルを表示 Open project: MarcFletcher/NetworkComms.Net

Public Methods

Method Description
AverageNetworkLoadIncoming ( byte secondsToAverage ) : double

Returns the averaged value of CurrentNetworkLoadIncoming, as a value between 0 and 1, for a time window of up to 254 seconds. Triggers load analysis upon first call.

AverageNetworkLoadOutgoing ( byte secondsToAverage ) : double

Returns the averaged value of CurrentNetworkLoadIncoming, as a value between 0 and 1, for a time window of up to 254 seconds. Triggers load analysis upon first call.

FilteredLocalAddresses ( ) : List

Returns all allowed local IP addresses. Caches results for up to 5 second since the previous refresh. If RestrictLocalAdaptorNames has been set only returns IP addresses corresponding with specified adaptors. If RestrictLocalAddressRanges has been set only returns matching addresses ordered in descending preference. i.e. Most preferred at [0].

FilteredLocalAddresses ( bool forceCacheUpdate ) : List

Returns all allowed local IP addresses. Caches results for up to 5 second since the previous refresh unless forceCacheUpdate is true. If RestrictLocalAdaptorNames has been set only returns IP addresses corresponding with specified adaptors. If RestrictLocalAddressRanges has been set only returns matching addresses ordered in descending preference. i.e. Most preferred at [0].

Private Methods

Method Description
NetworkLoadWorker ( ) : void

Takes a network load snapshot (CurrentNetworkLoad) every NetworkLoadUpdateWindowMS

ShutdownThreads ( int threadShutdownTimeoutMS = 1000 ) : void

Shutdown any background threads in the host tools

Method Details

AverageNetworkLoadIncoming() public static method

Returns the averaged value of CurrentNetworkLoadIncoming, as a value between 0 and 1, for a time window of up to 254 seconds. Triggers load analysis upon first call.
public static AverageNetworkLoadIncoming ( byte secondsToAverage ) : double
secondsToAverage byte Number of seconds over which historical data should be used to arrive at an average
return double

AverageNetworkLoadOutgoing() public static method

Returns the averaged value of CurrentNetworkLoadIncoming, as a value between 0 and 1, for a time window of up to 254 seconds. Triggers load analysis upon first call.
public static AverageNetworkLoadOutgoing ( byte secondsToAverage ) : double
secondsToAverage byte Number of seconds over which historical data should be used to arrive at an average
return double

FilteredLocalAddresses() public static method

Returns all allowed local IP addresses. Caches results for up to 5 second since the previous refresh. If RestrictLocalAdaptorNames has been set only returns IP addresses corresponding with specified adaptors. If RestrictLocalAddressRanges has been set only returns matching addresses ordered in descending preference. i.e. Most preferred at [0].
public static FilteredLocalAddresses ( ) : List
return List

FilteredLocalAddresses() public static method

Returns all allowed local IP addresses. Caches results for up to 5 second since the previous refresh unless forceCacheUpdate is true. If RestrictLocalAdaptorNames has been set only returns IP addresses corresponding with specified adaptors. If RestrictLocalAddressRanges has been set only returns matching addresses ordered in descending preference. i.e. Most preferred at [0].
public static FilteredLocalAddresses ( bool forceCacheUpdate ) : List
forceCacheUpdate bool If true will refresh the cache and return latest result
return List