Closed ArthaTi closed 6 years ago
@Soaku did you try the demo here: https://github.com/LudiDorici/godot-websocket/tree/master/websocket_chat_demo
Also, I forgot to add the
client.poll()
method in_process
. It doesn't change anything anyway.
Well, if you don't poll, it won't work in native client. But HTML5 does, because the browser does that for you and there is no way to prevent that. That would explain why HTML5
was working and native was not.
If you think you are polling now, but it still does nothing and you get no error. I suspect there is either an error in your code, or some troubles with your local server (less likely).
Other people have been using WebSocket on Windows and reported it to work.
Let me know if the linked demo works for you.
@Faless Sorry for the trouble, didn't really understand how the .poll
method works. Fixed it now. Thanks!
From this and various other threads I compiled a working example here. https://github.com/dirkk0/nodejs-godot-websockets
Godot version: v.3-1.alpha-official
OS/device including version: Everything except HTML5, confirmed on Windows Desktop, Android and normal Windows debug.
Issue description: I've tried connecting to websockets at
localhost
,127.0.0.1
, my domain address, my server IP; with and all without prefixing the URL withws://
orwss://
. Website certificate is saved in Godot's files. None of it ever worked except when exporting to HTML5, where it succeeds. The server doesn't ever receive any signals from Godot. Client is defined as a class property withvar client = WebSocketClient.new()
in a global/singleton. App is stuck connecting and doesn't report any errors.client.get_connection_status()
returns1
(WebSocketClient.CONNECTION_CONNECTING
). Nor Godot or the game is blocked by firewall.I've also created a question 2 days ago: https://godotengine.org/qa/33572/connecting-to-websockets-doesnt-end
Steps to reproduce: Create a websocket client and try to connect.
Minimal reproduction project: websocket.zip
Also, I forgot to add the
client.poll()
method in_process
. It doesn't change anything anyway.