feat(websocket)!: Implement WebSocket connection and event handling

This commit is contained in:
2025-11-22 18:32:28 +01:00
parent 09cc96141d
commit ba373f91e9
25 changed files with 420 additions and 80 deletions

View File

@@ -1,21 +0,0 @@
package actor
import org.apache.pekko.actor.{Actor, ActorRef}
import org.apache.pekko.http.scaladsl.model.ContentRange.Other
class KnockOutWebSocketActor(
out: ActorRef,
) extends Actor {
def receive: Receive = {
case msg: String =>
out ! s"Received your message: ${msg}"
case other: Other =>
println(s"Received unknown message: $other")
}
def sendJsonToClient(json: String): Unit = {
println("Received event from Controller")
out ! json
}
}