zio-http
zio-http copied to clipboard
WebSocket architectural & feature improvements
Is your feature request related to a problem? Please describe.
Ideally WebSockets would be more thoroughly integrated into ZIO HTTP, with a more comprehensive feature set (e.g. sending a message to a client before receiving one), and with fewer data types in ZIO HTTP.
Describe the solution you'd like
Unknown.
Describe alternatives you've considered
None.
The current API allows sending a message without waiting for one from the client (collect on handshake event). ChannelEvents are a bit complex, but can give a lot of performance gains while doing broadcasts. I agree it's not the most elegant though. I think we can enhance it by attaching a middleware.