how to use Hibernatable WebSockets API?
Is there any example to show how to use Hibernatable WebSockets API?
Just use state.acceptWebSocket, not use ws.accept()?
4 Replies
Have you looked at these docs yet? https://developers.cloudflare.com/durable-objects/api/hibernatable-websockets-api/
I really thought there was a better example, but for now you can have a look at https://github.com/cloudflare/workers-chat-demo/tree/hibernation
I don’t think it is a demo of using Hibernatable web socket
I don't know what you mean, that absolutely uses the hibernation API. The main branch in that repo doesn't, but the branch I linked does.
The branch is right.very helpful.thank you!