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:
base
package: handles HTTP/HTTPS connection creation and provides functions to interact with an HTTP servergetIP
package: implements IP and ISP info fetchingdownload
package: implementation of the streams used for the download testupload
package: implementation of the streams used for the upload testping
package: implementation of a "ping stream" used for the ping+jitter test and the server selectortelemetry
package: implements telemetry senderserverSelector
package: implements the automatic server selection processlog
package: a simple logger used to collect telemetryconfig
package: configuration for the speedtest and the telemetryworker
package: implements the speedtestSpeedtest
class: wraps everything up