Skip to content
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

Add examples to PacketPeerUDP class documentation #99015

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

CabalCrow
Copy link
Contributor

  • Minor change to PacketPeerUDP class description
  • Add usage examples to PacketPeerUDP class description, about sending and receiving packets.

Currently to understand how to properly use PacketPeerUDP you need to read through both the methods of the class and the methods of PacketPeer. This is why I added examples for what I believe are the main things you would be using the class.

P.S.: The PacketPeerUDP.bind() method documentation needs updating, as it doesn't just affect the listening port, but also affects the port used to send packets (I showcase this in the example). This is not documented. However I'm not well versed in the actual code of this method, so I'm not sure how to precisely exaplain its exact function. This is why I haven't made changes to the bind method description.

@CabalCrow CabalCrow requested a review from a team as a code owner November 10, 2024 11:36
@Mickeon Mickeon added this to the 4.4 milestone Nov 10, 2024
@Mickeon Mickeon requested a review from a team November 10, 2024 14:22
Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

Looks good now, but the networking team should take a look at it.

@CabalCrow CabalCrow force-pushed the PacketPeerUDP-docs-example branch from 42f1a47 to ad772de Compare November 10, 2024 14:32
Add examples for sending packets and listening for packets.

Fix documentation indentation.

Change tabs to spaced for codeblocks.

Fix typos

Remove typing in documentation code

Add a blank line to comply with style guidelines

Fix blank line to contain tabs

Remove tabs from empty code lines

Commit suggested changes by Mickeon

Use correct syntax for >
@CabalCrow CabalCrow force-pushed the PacketPeerUDP-docs-example branch from 6a82d54 to 5516088 Compare November 10, 2024 16:34
Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@Repiteo Repiteo merged commit 0439686 into godotengine:master Nov 12, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 12, 2024

Thanks! Congratulations on your first contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants