-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Closed
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:durable-objectsDurable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/
Description
Existing documentation URL(s)
https://developers.cloudflare.com/durable-objects/examples/websocket-server/
What changes are you suggesting?
The comment says the server responds with the same message. I don't see the original message in the send call.
Is it a mistake or is the message added automatically?
cloudflare-docs/src/content/docs/durable-objects/examples/websocket-server.mdx
Lines 84 to 90 in 47f6d99
| // Upon receiving a message from the client, the server replies with the same message, | |
| // and the total number of connections with the "[Durable Object]: " prefix | |
| server.addEventListener("message", (event) => { | |
| server.send( | |
| `[Durable Object] currentlyConnectedWebSockets: ${this.currentlyConnectedWebSockets}`, | |
| ); | |
| }); |
Additional information
No response
Metadata
Metadata
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:durable-objectsDurable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/