LatencyGG-DotNET 0.2.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package LatencyGG-DotNET --version 0.2.2                
NuGet\Install-Package LatencyGG-DotNET -Version 0.2.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LatencyGG-DotNET" Version="0.2.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LatencyGG-DotNET --version 0.2.2                
#r "nuget: LatencyGG-DotNET, 0.2.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. 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.2

// Install LatencyGG-DotNET as a Cake Tool
#tool nuget:?package=LatencyGG-DotNET&version=0.2.2                

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 Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 855 12/22/2021
0.2.2 876 12/17/2021
0.2.1 807 12/17/2021
0.2.0 780 12/17/2021