Websocket Server with Durable Object Client Connection
Hi, I try build a websocket server with durable object hibernation api, on the server side I think its considered done,
but on the client side, how we connect to the durable object using service binding ?
I'm using cloudflare pages and want to connect to the websocket server using service binding
anyone have code snippet to get address
already connected on the wrangler side,
but I'm strugle to get the websocket service endpoint dynamically from service binding
any advise ?
6 Replies
have handler to return
can be curl-ed
but on pages side
seem not working.
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
Worker handling the request (Edit: this will be your pages function):actually I need it on the pages itself / client side. not the page function
Websocket DO:yeah already do like this. The things is we have a CF Worker - Websocket DO I need my CF Pages / any other client / agent there to connect to websocket server. on the Pages side, since there is service binding, we don't need to connect outside of cloudflare network. so when end user open my pages, they can do websocket connection to the web server and reach / communicate with others.
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
basically our CF Pages will act as a Proxy to our DOWebsocket ya?
got this error before
does it guaranted it will work on the prod itself?
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View