webSocket("/ws") {
try {
while (true) {
when(val frame = incoming.receive()){
is Frame.Text -> {
val text = frame.readText() //i want to Serialize it to class object
send(Frame.Text(processRequest(text)))
}
else -> TODO()
}
}
} finally {
TODO()
}
}
我想序列化frame.readText()
以返回类对象我对 Ktor 世界完全陌生,我不知道这是否可能