我下载了包含简单websocket端点的Lagom示例项目
named("example-stream")
.withCalls(
namedCall("stream", stream)
).withAutoAcl(true)
当我启动应用程序并尝试打开websocket连接(ws:// localhost:9000 / stream)时,服务器日志打印出来:
[warn] akka.actor.ActorSystemImpl [sourceThread=application-akka.actor.default-dispatcher-53, akkaSource=akka.actor.ActorSystemImpl(application), sourceActorSystem=application, akkaTimestamp=18:02:21.293UTC] - HTTP header 'Sec-WebSocket-Extens
ions: permessage-deflate' is not allowed in requests
20:02:21.301 [warn] runstats-stream [] - Could not negotiate a deserializer for type MessageProtocolImpl(Some(none/none),None,None), the default media type supported is MessageProtocolImpl(Some(text/plain),Some(utf-8),None)
为此,我使用名为Browser Websocket客户端的Firefox插件。据我所知,Websocket握手不需要或设置Content-Type,这显然是websocket端点所期望的。
我做错了什么或者生成的项目是否有效?
答案 0 :(得分:0)
与此同时,您可以在migration guide details on how to select a different server engine之后选择加入基于网络的实施(以前是默认设置)。