XGameRuntime: XNetworking change registrations fire the initial callback #1237
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1237
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1237"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@emirduran707 on GitHub · 2026-11-24 13:34 UTC · original
emirduran707:xnetworking-initial-callbacks→main· +104 −9 · 1 files · 1 commits · openXNetworkingRegisterConnectivityHintChangedandXNetworkingRegisterPreferredLocalUdpMultiplayerPortChangedhanded out a token and never called the callback. Microsoft's documentation says both send a first callback when they register: the connectivity one "registers a "connectivity hint changed" notification and sends an initial notification callback", and the port one "always fires an initial notification callback". The network-initialization guidance builds on that: a title registers and then waits for the callback to reportnetworkInitialized. Under XCL such a title waited forever, or treated the network as not up.Both now write the token, then queue one callback on the queue's completion port through
xasync::submit_callback, asnotify_associationdoes for user-association changes. The connectivity callback carries the current hint fromXNetworkingGetConnectivityHint, and the port callback carriesDEFAULT_UDP_PORT. A null callback isE_INVALIDARG, as forXUserRegisterForDeviceAssociationChanged. If the queue refuses the callback, its record is freed and a warning is logged.What is in it
crates/xcl/src/hle/xgameruntime/networking.rs: the first callbacks; testregister_fires_an_initial_callback. It uses an immediate queue and checks that each callback runs once, withnetwork_initializedtrue and port 3074, and that a null callback is refused.Tested
cargo test --workspace -- --test-threads=4one2a4b1d: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsleft: 0,right: 1; with it it passesRegression run
main:
this PR:
Not tested
XCL_NETWORK=0level (it comes fromXNetworkingGetConnectivityHint); not run together.AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-24 14:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Thanks!
@DavidM1911 on GitHub · 2026-11-26 04:17 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.