Implementation details - librespeed/speedtest-android GitHub Wiki
This chapter is dedicated to the inner workings of the com.fdossena.speedtest.core package. You don't need to read this section if you're just customizing the template or making a custom UI, it's only here if you need to make changes to how the speedtest client works.
If you also need to know how the speedtest server works, see here.
Remember that both the server and this client are under a GNU LGPLv3 license, so any modification you make to it MUST be publicly available in source form! No exceptions.
The core is basically an HTTP client implemented using only Sockets, Threads and Java streams, so very good knowledge of these topics is mandatory if you want to make changes here.
This chapter will be divided into the following sections:
basepackage: handles HTTP/HTTPS connection creation and provides functions to interact with an HTTP servergetIPpackage: implements IP and ISP info fetchingdownloadpackage: implementation of the streams used for the download testuploadpackage: implementation of the streams used for the upload testpingpackage: implementation of a "ping stream" used for the ping+jitter test and the server selectortelemetrypackage: implements telemetry senderserverSelectorpackage: implements the automatic server selection processlogpackage: a simple logger used to collect telemetryconfigpackage: configuration for the speedtest and the telemetryworkerpackage: implements the speedtestSpeedtestclass: wraps everything up