LatencyGG-DotNET 0.2.4

Install-Package LatencyGG-DotNET -Version 0.2.4
dotnet add package LatencyGG-DotNET --version 0.2.4
<PackageReference Include="LatencyGG-DotNET" Version="0.2.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LatencyGG-DotNET --version 0.2.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LatencyGG-DotNET, 0.2.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install LatencyGG-DotNET as a Cake Addin
#addin nuget:?package=LatencyGG-DotNET&version=0.2.4

// Install LatencyGG-DotNET as a Cake Tool
#tool nuget:?package=LatencyGG-DotNET&version=0.2.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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());
  • .NETFramework 4.6

    • No dependencies.
  • net5.0

    • 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.

Version Downloads Last updated
0.2.4 50 12/22/2021
0.2.2 105 12/17/2021
0.2.1 78 12/17/2021
0.2.0 59 12/17/2021