zim
zim copied to clipboard
Support typed websocket
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like 类型化ws指的是将ws协议的传输媒介由目前的text改成 frame+case class json,涉及到解码器和akka ws相关的修改:
-
WsApi.scala
-
WsEndpoint.scala
-
wsService.scala#openConnection
- 可能涉及到前端的修改:如
websocket.js
- 支持完typed,
WsMessageForwardBehavior
就可以去掉转发消息TransmitMessageProxy
,不再需要手动decode。直接使用case class的即可。
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.