我正在成功处理客户端消息/请求
object EchoService {
def route: Route = path("ws-echo") {
get {
handleWebSocketMessages(echoService)
}
}
val echoService: Flow[Message, Message, _] = Flow[Message].map {
case TextMessage.Strict(txt) => TextMessage("ECHO: " + txt)
case _ => TextMessage("Message type unsupported")
}
}
如何从服务器向客户端发送消息?