Giter VIP home page Giter VIP logo

speedtest.net's Introduction

SpeedTest.Net

A simple https://speedtest.net and https://fast.com client to calculate download speed in multiple units. Made with love using .Net Core.

Install via nuget

Install-Package SpeedTest.NetCore -Version 2.1.0

Get a Server closest to your location

var server = await SpeedTestClient.GetServer();

Or Get a Server closest to the provided geo co-ordinates

var server = await SpeedTestClient.GetServer(37.0902, 95.7129);

Get Download Speed using the server

var speed = await SpeedTestClient.GetDownloadSpeed(server);

Or simply Get Download Speed using your location

var speed = await SpeedTestClient.GetDownloadSpeed();

If you like your results from fast.com use

var speed = await FastClient.GetDownloadSpeed();

speedtest.net's People

Contributors

junaidak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

speedtest.net's Issues

Can't import it in the project

I have installed this package using NuGet in Unity.
I'm unable to import the SpeedTestClient in the project. Can you please help?

Upload

Is there a plan to add upload speed?

Giving object reference error on below code

Install your nugget packet and write down below code, I got object reference error from your function and application came in break mode.

public static async Task<double> GetServerSpeed()
   {
       var server = await SpeedTestClient.GetServer();
   var speed = await SpeedTestClient.GetDownloadSpeed(server);
   var speed1 = await FastClient.GetDownloadSpeed();
       return speed.Speed;
   }

Nothing but 500's using SpeedTest

Any download test that I do using var speed = await SpeedTestClient.GetDownloadSpeed(); results in a 500 error. If I switch to FastClient I get results. As shown in the code below, If I switch to getting the server by geo location, then adding server to the GetDownloadSpeed I still get a 500.

using Serilog;
using SpeedTest.Net;

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Debug()
    .WriteTo.Console()
    .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Month)
    .CreateLogger();

Log.Information("Starting SpeedTestV3");
Log.Information("Running Speed test");
//var server = await SpeedTestClient.GetServer(37.540726, -77.436050);
var speed = await SpeedTestClient.GetDownloadSpeed();
Log.Information($"Speed is: {speed.Speed} {speed.Unit}");
Log.Information("Speed test complete");

.NET 8.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.