Skip to content

Conversation

@aGuyWhoMadeGames
Copy link
Contributor

@aGuyWhoMadeGames aGuyWhoMadeGames commented Jun 3, 2024

The new example is a combination of the old example and the example from the class reference.
This fixes #9138 and fixes #6631.

@skyace65 skyace65 added bug area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:network labels Jun 4, 2024
@aGuyWhoMadeGames
Copy link
Contributor Author

Thanks for the corrections. This is my first PR other than a few small fixes, so I wasn't aware of all of the guidelines. I fixed everything you said.

@AThousandShips AThousandShips requested a review from a team June 4, 2024 18:51
Copy link
Contributor

@skyace65 skyace65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code works for me

# The code will be -1 if the disconnection was not properly notified by the remote peer.
var code = socket.get_close_code()
print("WebSocket closed with code: %d. Clean: %s" % [code, code != -1])
set_process(false) # Stop processing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one final nitpick, the code should be indented with spaces, not tabs, otherwise this is all good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I converted the tabs to spaces. If it matters, shouldn't this be part of the lint though?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why it isn't but I think it's a limitation of the system, unsure

@AThousandShips AThousandShips merged commit 4300b34 into godotengine:master Jun 5, 2024
@AThousandShips
Copy link
Member

Thanks!

@Faless
Copy link
Contributor

Faless commented Jun 6, 2024 via email

@aGuyWhoMadeGames
Copy link
Contributor Author

I changed the url because the previous one wasn't working, and all of the minimal examples I saw used the one I'm using here.

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 bug topic:network

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated Documentation : WebSocketClient became WebSocketPeer Outdated minimal example in websocket page

4 participants