WebSocket connection stuck in 'Connecting' state and never establishes #2079
-
|
I'm using OneJS with Unity on Windows, and I'm having trouble getting WebSocket connections to work. I compiled puerts with each available SSL option:
Regardless of the setting, the result is the same: What I've Tried:
Any insight would be greatly appreciated — thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
chexiongsheng
Jun 20, 2025
Replies: 1 comment 3 replies
-
|
Have you called JsEnv.Tick? Websocket relies on this to poll for messages. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Websocket is used in the released games, using
wss://protocols, using SSL option 2, everything is ok. Puerts' unit test also hasws://test, passed in every commit recent.test case here: https://github.com/Tencent/puerts/blob/master/unity/test/Src/Cases/WebsocketTest.cs#L86
Have you tried addEventListener for error event to see if there is any information?