Closed universse closed 3 years ago
I just re-read the doc and it's just been added. Nice work 🚀. Any chance worktop could handle ping/pong messages by default as well?
Hi,
Yes, preliminary websocket support was added in 0.6.0. This is single channel support – aka, WS handler for a single connection. There's no DO integration yet, which means that broadcasting/synchronizing WS connections is not currently possible.
Worktop will add official DO support once Durable Objects are ready to leave their beta phase.
Until then, you can attach DOs yourself, but you'll have to do a lot of stuff manually.
Any chance worktop could handle ping/pong messages by default as well?
No – this is application-specific and while it may sound like a harmless default, Worktop is only going to put stuff in your output if you asked for it or if you put it there.
Closing, as this is on the roadmap but its release date depends on DO's date.
Hi. It would be cool if worktop can support WebSocket in the future. It's especially powerful when paired with Durable Object, as explained here.
I have been using https://github.com/uNetworking/uWebSockets.js. and quite like their API as I can define both http and ws routes.
I'm considering switching to Cloudflare since I won't have to think about scaling infrastructure, which is enticing.