Skip to content

Update WebSocket documentation for Godot 4 #7645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TranquilMarmot
Copy link
Contributor

WebSocketClient and WebSocketServer were removed from Godot 4.

For the minimal client, I basically copied what was in the docstring for WebSocketPeer.

I changed the client example to point to postman-echo.com since I couldn't figure out how to set the protocol (lws-mirror-protocol in the old example) with WebSocketPeer. If anybody knows how to set that, we can change it back- although I prefer the example without the protocol since that was confusing to me when I first read through it.

I'm also not certain that the server example here is correct.
Do you really have to keep track of peer IDs manually? I didn't see a way to get a list of connected peers on the WebSocketServer
Does the peer need to be polled as well as the server? I could never trigger it getting a packet from a peer, but maybe I was testing it incorrectly.

@AThousandShips AThousandShips added the area:manual Issues and PRs related to the Manual/Tutorials section of the documentation label Jul 16, 2023
@AThousandShips
Copy link
Member

AThousandShips commented Jul 16, 2023

You need a newline at the end of the file, see the checks for details

@AThousandShips
Copy link
Member

Please squash your commits into one, see here

@TranquilMarmot
Copy link
Contributor Author

@AThousandShips thanks for the style fixes! I merged them and squashed the commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation cherrypick:4.0 cherrypick:4.1 cherrypick:4.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants