We have a PR up to Serialize Attachement
We have a PR up to Serialize Attachement back to docs. It will be merged soon
5 Replies
This is now live here
https://developers.cloudflare.com/durable-objects/best-practices/websockets/#extended-methods
Cloudflare Docs
Using WebSockets · Cloudflare Durable Objects docs
WebSockets are long-lived TCP connections that enable bi-directional, real-time communication between client and server. Both Cloudflare Durable Objects and Workers can act as WebSocket endpoints – either as a client or as a server. Because WebSocket sessions are long-lived, applications commonly use Durable Objects to accept either the client o...
Thank you for adding this back!
What is a typical use case for these functions knowing that we have durable
object storage? I’m having a hard thinking about scenarios in which it makes sense to use them.
Hey, these functions are used when you are using WebSocket Hibernation API and want to store some state that should survive the hibernation. You can use the persistent storage (KV, SQLite) as well but you would have to write custom logic to attach data for each connection. Eg. serialize attachment can store info like username of the connection. So when the connection wakes up, you can use the same username
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View