-
Notifications
You must be signed in to change notification settings - Fork 461
feat: Change default listen address to 0.0.0.0 #2307
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f88ce73
feat: Change default listen address to 0.0.0.0
simon-lemay-unity 79445d8
Add PR number to CHANGELOG entry
simon-lemay-unity 9ae413a
Fix IPv6 handling
simon-lemay-unity dfefdb7
Fix restart test and improve logging
simon-lemay-unity 2300dcb
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity 75d2b87
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity a3445f0
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity 69b71b1
Update com.unity.netcode.gameobjects/Tests/Editor/Transports/UnityTra…
simon-lemay-unity c3b8860
Update com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTran…
simon-lemay-unity 15c168a
Address some review feedback
simon-lemay-unity dff55d4
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity 7ee44d7
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity 4d21709
Try to make standards script happy
simon-lemay-unity 07471bb
Merge branch 'develop' into feat/default-listen-address
simon-lemay-unity 3dcac6d
Move the CHANGELOG entry to the next release
simon-lemay-unity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this log
Debug.LogError($"Invalid network endpoint: {ip}:{port}.");in the case where the server listen address is empty?I don't see an actual test case for this conditional - do we have one for an empty address versus a malformed one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather, line 339 (accessing ServerEndPoint) would log this in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if both the 'Address' and 'Listen Address' fields are left empty, it will log an error. Although that scenario was never supported before. The previous behavior if leaving 'Listen Address' empty was to use 'Address'. I can add a special case where if both are left empty, we revert to 0.0.0.0 as the listen address.
There are no specific tests for leaving the listen address empty, but that is what a lot of tests actually end up doing, since it's the default when calling
SetConnectionDatawithout explicitly setting a listen address.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a change that avoids an error if both 'Address' and 'Listen Address' are empty (we'll then default to 0.0.0.0). Also added a test case for this particular scenario.