I'm not so sure about that, I think the tricky thing is is that the connection comes starts in the W

I'm not so sure about that, I think the tricky thing is is that the connection comes starts in the Worker. The Worker creates and start's listening to WebSocket events with the client. Once a websocket event comes in that subscribes to a specific chatroom channel, I need to somehow communicate from the Worker to the Durable Object in real-time.

  • I can't start a client / server from the Worker since there is no way I can pass the client in a Fetch request to the Durable Object.
  • I can't start a client / server from the Durable Object, since the response of the durable object with fetch, doesn't include the webSocket.
Was this page helpful?