Skip to main content

Module servers

Module servers 

Source

Functionsยง

calculate_distance
Calculate distance between two geographic points using Haversine formula.
fetch
Fetch the list of available speedtest servers, sorted by distance.
fetch_client_location
Fetch client location from speedtest.net config API.
measure_latency_under_load
ping_test
Run a ping test against the given server, returning (average latency, jitter, packet_loss%, individual_samples).
select_best_server
Select the best server from a list, preferring the closest by distance.