The WebSocket connection is unexpectedly closed, and the program crashes. #1843
Unanswered
LetAmericaGreatAgain
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It's a single threaded library you can't just spawn a thread and do whatever you want. Can't call ws->send from other thread, need Loop::defer. Can't just send without keeping track of if the websocket closed or not. Lots of issues in this snippet. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to push video frames via WebSocket, where each frame is 3,110,400 bytes in size. After the connection is established, the client browser sends a message, and after the server receives it, it calls this->play(ws) to start pushing the video frames. However, after sending a few frames, the program crashes, and I don't know why the WebSocket connection is being closed. It has been confirmed that the issue is related to WebSocket, and it might be due to the size of the data being sent. The relevant code is as follows:
Beta Was this translation helpful? Give feedback.
All reactions