fix(core): update

This commit is contained in:
2021-04-28 13:41:55 +00:00
parent d8044507ed
commit 260f000304
9 changed files with 269 additions and 42 deletions

View File

@ -1,33 +1,6 @@
import * as plugins from './smartnetwork.plugins';
export interface ISpeedtestData {
timestamp: Date;
ping: { jitter: number; latency: number };
download: { bandwidth: number; bytes: number; elapsed: number };
upload: { bandwidth: number; bytes: number; elapsed: number };
packetLoss: number;
isp: string;
interface: {
internalIp: string;
name: string;
macAddr: string;
isVpn: false;
externalIp: string;
};
server: {
id: number;
name: string;
location: string;
country: string;
host: string;
port: number;
ip: string;
};
result: {
id: string;
url: string;
};
}
import { CloudflareSpeed } from './smartnetwork.classes.cloudflarespeed';
/**
* SmartNetwork simplifies actions within the network
@ -38,7 +11,8 @@ export class SmartNetwork {
* @param measurementTime
*/
public async getSpeed() {
const test = null;
const cloudflareSpeedInstance = new CloudflareSpeed();
const test = await cloudflareSpeedInstance.speedTest();
return test;
}