add crud repo server and change a lot of different things

This commit is contained in:
2020-08-25 15:55:47 +06:00
parent 14d6915282
commit b94417b77d
16 changed files with 339 additions and 77 deletions

View File

@@ -27,9 +27,7 @@ class WebsocketsTest {
val server = createKtorServer(host = "127.0.0.1", port = port) {
install(WebSockets)
routing {
includeWebsocketHandling(suburl, dataFlow) {
standardKtorSerialFormat.encodeToByteArray(Int.serializer(), it)
}
includeWebsocketHandling(suburl, dataFlow, Int.serializer())
}
}.also {
it.start(false)
@@ -42,10 +40,9 @@ class WebsocketsTest {
}
val incomingWebsocketFlow = client.createStandardWebsocketFlow(
"$serverUrl/$suburl",
{ false } // always skip reconnection
) {
standardKtorSerialFormat.decodeFromByteArray(Int.serializer(), it)
}
{ false }, // always skip reconnection
deserializer = Int.serializer()
)
var currentlyCheckingData: Int? = null
incomingWebsocketFlow.onEach {