Real-time messaging library for Go. The simplest way to add feature-rich and scalable WebSocket support to your application. The core of Centrifugo server.
[x] Make a POC based on quic-go Webtransport pull request
[ ] Make sure Disconnect logic matches ours (i.e. WT can be closed with code and string reason)
[ ] Add StreamCommandDecoder which accepts io.Reader and exposes Commands
[ ] Modify DataEncoder to always append \n to JSON, for single WebSocket messages we have fast path which does not use DataEncoder – so for single messages \n won't be included into payload sent.
[ ] Expose handleCommand to Client's public API. Maybe remove Client.Handle and move command decoding to Transport.
[ ] With the base above introduce an example with NewWebtransportHandler and WebtransportConfig which uses quic-go for WT stuff.
An issue to track WebTransport support:
StreamCommandDecoder
which acceptsio.Reader
and exposesCommand
sDataEncoder
to always append\n
to JSON, for single WebSocket messages we have fast path which does not useDataEncoder
– so for single messages\n
won't be included into payload sent.handleCommand
toClient
's public API. Maybe removeClient.Handle
and move command decoding to Transport.NewWebtransportHandler
andWebtransportConfig
which usesquic-go
for WT stuff.