Net

interface Net(source)

TCP queries from the unit. Obtain it from net; needs NETWORK.

Loopback hosts (127.0.0.1 and localhost) are always allowed with the network permission. Any other host also needs NETWORK_OUTBOUND. The API is plain TCP: the car's Java 1.4 library has no TLS stack, so use a local proxy if you need HTTPS.

Properties

Link copied to clipboard
The largest response, in bytes.
Link copied to clipboard
val MAX_TIMEOUT_MS: Int = 3000
The largest timeout, in milliseconds.

Functions

Link copied to clipboard
abstract fun query(host: String, port: Int, request: String, timeoutMs: Int): String
Connects to a TCP service, writes the request and reads until EOF.