我一直在使用 Akka SSE,发现在客户端使用 javascript 可以轻松理解 SSE。 http://runkalrun.blogspot.in/2016/01/server-sent-events-sse-using-scala-akka.html
唯一的问题是,该Ok.feed()
方法在 play 2.6 中已被弃用,尽管我们可以使用Ok.chunked()
使用 Source 作为参数的方法。该示例使用一个Concurrent.broadcast
,它给出了枚举流和一个通道。如何使用流和通道来分块事件?如果有人对此进行了研究,甚至欢迎任何形式的建议。
ps 我正在使用 play Scala。