@kirz/expo-speedtest
Version:
Measure internet latency, download and upload speed
26 lines • 1.07 kB
TypeScript
/**
* Run a test to measure the latency to a cloudflare server (download 0 bytes)
* @returns The latency in milliseconds
*/
declare function testLatency(): Promise<number>;
/**
* Run a test to measure the download speed from a cloudflare server
* @param byteToSend The number of bytes to download
* @returns The download speed in Mbps
*/
declare function testDownload(byteToSend?: number | undefined): Promise<number>;
/**
* Run a test to measure the upload speed to a cloudflare server
* @param byteToSend The number of bytes to upload
* @returns The upload speed in Mbps
*/
declare function testUpload(byteToSend?: number | undefined): Promise<number>;
/**
* Run a test to measure the latency to a given host
* @param host The hostname or IP address of the host to ping
* @param timeout The timeout in milliseconds. Defaults to 1000.
* @returns The latency in milliseconds
*/
declare function testPing(host: string, timeout: number): Promise<number>;
export { testLatency, testDownload, testUpload, testPing };
//# sourceMappingURL=speedtest-module.d.ts.map