Closed zaksnet closed 4 years ago
What version of Godot are you running? I also see an error (red) in the debugger tab, would be nice if you could post the error too
What version of Godot are you running? I also see an error (red) in the debugger tab, would be nice if you could post the error too
Sorry forgot the mention the version :grimacing:, Its the latest Godot 3.2 Beta 4. I'm not sure about the error (probably some missing signal connection i had messed with) and i have deleted the test project folder so i cant test it :/. But i just tested with a fresh download of WebSocketChat and there is no error in the debugger tab but the issue remains.
@zaksnet can you run the project in verbose mode? (project -> project settings -> debug -> settings -> Verbose Stdout
) and see if any socket error pops out in the output tab? Is it possible that port 8000
is already in use in your machine and the server fails to start?
I.e. : Can you try changing the listen and connect port to something else, e.g. 8082
(remember to change it in client connect row too)
Nope, no errors: The server is running as far as i can tell and from my project i could connect using Simple websocket client. But now:
Also, just noticed these:
I'm not sure how to replicate these though :grimacing:
@Faless , the connection was refused because of the protocols. If i change them to an empty array it is fine. That brings us to my main issue with my project, let me see if i can replicate it with the chat application
Nope, 100% my fault. Messy code, everything works fine, sorry for the trouble!
As far as the WebSocketClient is concerned, just change:
_client.connect_to_url(_host.text, PoolByteArray(), multiplayer)
to
_client.connect_to_url(_host.text, ["my-protocol"], multiplayer)
PLATFORM Linux Mint 19.3 Godot 3.2 Beta 4
ISSUE I think something is broken with the WebSocketClient of Godot since i cant seem to be able to send any data to the server from my project. I also tested this with @Faless WebSocketChat demo and in that case the client just disconnects right after the connection is established. Some notes:
client.get_connection_status()
insidesend_message
returns 0 (the client is disconnected) BUT inside_process
it returns 2 (connected)assert(_client.get_peer(1).put_data(someData) == OK)
returns 1 (Generic error) instead of 0SAMPLE PROJECT WebSocketChat