ckoeninger
03/16/2023, 4:56 PMckoeninger
03/16/2023, 4:56 PMHardAtWork
03/16/2023, 4:56 PMckoeninger
03/16/2023, 4:57 PMRyan The Temp
03/16/2023, 5:52 PMts
const session = this.sessions.find((s) => s.streamId === streamId)
while (true && reader) {
const { done, value } = await reader.read()
if (done) break
console.log('sending to client', value)
session.socket.send(value)
}
it seems that the session.socket.send(...)
doesn't actually execute in realtime, but rather, the reader must be done first before sockets are updated..
🤦‍♂️Ryan The Temp
03/16/2023, 5:54 PMWorker A
receive streaming data, it doesn't seem to send anything to the socket (as shown above) until the streaming data is stopped.
I don't know if that makes sensejman
03/16/2023, 5:56 PMckoeninger
03/16/2023, 6:05 PMckoeninger
03/16/2023, 6:40 PMckoeninger
03/16/2023, 6:51 PMRyan The Temp
03/16/2023, 7:02 PMbroadcast.do.ts
on line 45 I left a comment that socket.send(...)
has no effect.
It's not clear to me why worker has to return a response for the socket to send.Giggiux
03/16/2023, 7:23 PMzegevlier
03/16/2023, 8:17 PMGiggiux
03/16/2023, 8:20 PM"message"
event ListenerGiggiux
03/16/2023, 8:22 PMzegevlier
03/16/2023, 8:22 PMzegevlier
03/16/2023, 8:22 PMGiggiux
03/16/2023, 8:23 PMaddEventListener
, but not those in the Listener functionzegevlier
03/16/2023, 8:24 PMwrangler dev --local
) works, but it doesn't work on a deployed worker?zegevlier
03/16/2023, 8:24 PMwrangler dev
?Giggiux
03/16/2023, 8:24 PMGiggiux
03/16/2023, 8:26 PMws
library, doesn't seem to work (while the other DO works)
The only way I can seem to get the message to read in the DO is using Postman testerjessec
03/17/2023, 6:40 PMHardAtWork
03/17/2023, 6:42 PMjessec
03/17/2023, 6:45 PMckoeninger
03/17/2023, 6:47 PMckoeninger
03/17/2023, 6:48 PMjessec
03/17/2023, 6:49 PMjessec
03/17/2023, 6:49 PM