TimeoutsSchema

@Serializable
data class TimeoutsSchema(val requestTimeoutMillis: Long? = null, val connectTimeoutMillis: Long? = null, val socketTimeoutMillis: Long? = null)

Per-request timeout overrides for the networking events that talk to a backend (SendNetworkRequest, GetScreen, RefreshScreen, DownloadFile, DownloadFileToDisk, DownloadFileToMemory, UploadFile), mapped one-to-one onto Ktor's HttpTimeout on the client. Every field is optional: a null keeps the client's default for that timeout.

Platform exceptions: on the web, downloads and uploads run on XMLHttpRequest, which only has a whole-request timeout — only requestTimeoutMillis applies, and without it the transfer has no timeout. On Android, DownloadFile goes through the system DownloadManager, which ignores these values.

Constructors

Link copied to clipboard
constructor(requestTimeoutMillis: Long? = null, connectTimeoutMillis: Long? = null, socketTimeoutMillis: Long? = null)

Properties

Link copied to clipboard
@SerialName(value = "connectTimeoutMillis")
val connectTimeoutMillis: Long?

time allowed to establish the connection.

Link copied to clipboard
@SerialName(value = "requestTimeoutMillis")
val requestTimeoutMillis: Long?

whole call, from sending the request to receiving the full response.

Link copied to clipboard
@SerialName(value = "socketTimeoutMillis")
val socketTimeoutMillis: Long?

maximum inactivity between two data packets — including the wait for the response headers, so it must cover the time the server takes to answer.