LatencyGG-DotNET
0.2.0
See the version list below for details.
dotnet add package LatencyGG-DotNET --version 0.2.0
NuGet\Install-Package LatencyGG-DotNET -Version 0.2.0
<PackageReference Include="LatencyGG-DotNET" Version="0.2.0" />
paket add LatencyGG-DotNET --version 0.2.0
#r "nuget: LatencyGG-DotNET, 0.2.0"
// Install LatencyGG-DotNET as a Cake Addin #addin nuget:?package=LatencyGG-DotNET&version=0.2.0 // Install LatencyGG-DotNET as a Cake Tool #tool nuget:?package=LatencyGG-DotNET&version=0.2.0
LatencyGG Probe Library for C#
A C# library for latency measurements using the LatencyGG network.
Usage
See the example for recommended usage.
QuickStart
First create an instance of LatencyGG specifying the type of AF
(eINET
for IPv4 eINET6
for IPV6) and the timeout
limit for pings.
LatencyGG.LatencyGG latency = new LatencyGG.LatencyGG(LatencyGG.AF.eINET, 2000);
Then create instances of DataPing, specifying the target_ip
(beacon address), own_ip
(user public ip), ident
(as provided by the Latency.gg Client API), token
(if provided by the Latency.gg Client API, "" if not), and dpversion
(3 if token supplied 2 if not).
LatencyGG.DataPing dataPing = new LatencyGG.DataPing(targetIp, ownIp, ident, token, dpversion);
Next, add
all of the pings you wish to run simultaneously (for accurate measurements don't run more than 10 measurements simultaneously).
latency.Add(ping1);
Finally, run
the measurement.
latency.Run();
If you need to terminate a running measurement before it is complete, discarding the measurements call Kill()
.
latency.Kill();
To check if all measurements are complete you can poll the IsComplete()
method.
if (latency.IsComplete()) {
// Do something
}
Results can be retrieved via a Map-like interface
LatencyGG.DataPing pingResult = latency[targetIp];
Console.Write(pingResult.GetStats().mRtt.ToString());
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.