UnifiedRequester#createStandardWebsocketFlow(String,DeserializationStrategy)

This commit is contained in:
InsanusMokrassar 2022-03-04 15:20:10 +06:00
parent 16c57fcd6a
commit 771aed0f0f
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,10 @@
## 0.9.10 ## 0.9.10
* Ktor:
* Client:
* New function `UnifiedRequester#createStandardWebsocketFlow` without `checkReconnection` arg
## 0.9.9 ## 0.9.9
* `Versions`: * `Versions`:

View File

@ -85,9 +85,14 @@ class UnifiedRequester(
fun <T> createStandardWebsocketFlow( fun <T> createStandardWebsocketFlow(
url: String, url: String,
checkReconnection: (Throwable?) -> Boolean = { true }, checkReconnection: (Throwable?) -> Boolean,
deserializer: DeserializationStrategy<T> deserializer: DeserializationStrategy<T>
) = client.createStandardWebsocketFlow(url, checkReconnection, deserializer, serialFormat) ) = client.createStandardWebsocketFlow(url, checkReconnection, deserializer, serialFormat)
fun <T> createStandardWebsocketFlow(
url: String,
deserializer: DeserializationStrategy<T>
) = createStandardWebsocketFlow(url, { true }, deserializer)
} }
val defaultRequester = UnifiedRequester() val defaultRequester = UnifiedRequester()