routing {
get("/hello") {
call.respond("Hello, World")
}
webSocket("/") { // websocketSession
for (frame in incoming) {
when (frame) {
is Frame.Text -> {
val text = frame.readText()
outgoing.send(Frame.Text("YOU SAID: $text"))
if (text.equals("bye", ignoreCase = true)) {
close(CloseReason(CloseReason.Codes.NORMAL, "Client said BYE"))
}
}
}
}
}
}
g
gotoOla
07/17/2019, 9:48 PM
hm yes different endpoints should definitely be able to respond in parallel, I had a look in my code and it seems I have never mixed them in the same routing-block though. Do you see anything in the logs when the endpoint returns a 500?