Skip to content

telemetry package

Federico Dossena edited this page Sep 12, 2019 · 1 revision
Telemetry class

Sends telemetry to the server over an existing Connection. Creates a new Thread to do it. Starts immediately (no need to call start()).

Constructor:

public Telemetry(Connection c, String path, String level, String ispinfo, String extra, String dl, String ul, String ping, String jitter, String log)
  • c: the instance of Connection to be used
  • path: path on the server where the IP and ISP info can be fetched
  • level: telemetry level
    • TelemetryConfig.DISABLED: sends nothing
    • TelemetryConfig.BASIC: sends only the results
    • TelemetryConfig.FULL: sends results and log
  • ispinfo, extra, dl, ul, ping, jitter, log: data to be sent. No null values.

Callbacks:

  • onDataReceived(String data): if the operation succedes, this is called with the response from the server (1 line)
  • onError(String err): if the operation fails, this is called with an error message
Clone this wiki locally