Long Polling Config
fun LongPollingConfig(delayMillis: Long, maxRequestCount: Int? = null, stopOnFirstRequestError: Boolean = false, onTransactionState: (TransactionState) -> Unit, onRequestError: (Exception) -> Unit, onMaxRequestCount: () -> Unit = { })
Parameters
delay Millis
delay between each request
max Request Count
maximum number of requests to be sent, null = no limit
stop On First Request Error
stop long polling on first error
on Transaction State
function called every time there is a successful response from server with current TransactionState of transaction
on Request Error
function called when unexpected error occurs (server or client side)
on Max Request Count
function called when maxRequestCount is achieved