XNetworking: wire UDP port change callbacks and UTF-16 security queries #1248

Manually merged
github merged 1 commit from gh-pr/1248/head into gh-pr/1248/base 2026-11-26 04:24:56 +00:00
Owner

@⁠ashrafsdrop on GitHub · 2026-11-24 16:46 UTC · original
ashrafsdrop:net/xnetworking-methods → main · +85 −16 · 1 files · 1 commits · merged 2026-11-25 00:13 UTC

Summary

Completes the remaining unimplemented slots in the XNetworking COM-style interface (Methods<18>):

  1. UDP Port Change Callbacks (Slots 6 & 7 / 0x30, 0x38):

    • Wired register (XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged) and unregister (XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged).
    • The default local multiplayer UDP port (3074) is fixed offline, so registration tokens are allocated via token() and the callback never needs to fire, avoiding E_NOTIMPL when titles register for port changes during startup or socket binding.
  2. UTF-16 Security Queries (Slots 11, 12, 13 / 0x58, 0x60, 0x68):

    • Added security_info_utf16_async for XNetworkingQuerySecurityInformationForUrlUtf16Async, logging wide URLs and completing the async task with UNREACHABLE (0x800704CF), matching the UTF-8 version.
    • Wired security_info_size and security_info_result into slots 0x60 and 0x68.
  3. Tests:

    • Added unit test assertions covering registration/unregistration of port change callbacks and async resolution of UTF-16 security queries.

Verification

  • cargo test -p victory-hle passed (94 tests, 0 failures).
  • cargo clippy -p victory-hle passed with zero warnings.
  • cargo run -p xtask -- policy verified (154 files ok).
**@⁠ashrafsdrop** on GitHub · 2026-11-24 16:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1248) `ashrafsdrop:net/xnetworking-methods` → `main` · +85 −16 · 1 files · 1 commits · merged 2026-11-25 00:13 UTC ### Summary Completes the remaining unimplemented slots in the `XNetworking` COM-style interface (`Methods<18>`): 1. **UDP Port Change Callbacks (Slots 6 & 7 / `0x30`, `0x38`)**: - Wired `register` (`XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged`) and `unregister` (`XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged`). - The default local multiplayer UDP port (`3074`) is fixed offline, so registration tokens are allocated via `token()` and the callback never needs to fire, avoiding `E_NOTIMPL` when titles register for port changes during startup or socket binding. 2. **UTF-16 Security Queries (Slots 11, 12, 13 / `0x58`, `0x60`, `0x68`)**: - Added `security_info_utf16_async` for `XNetworkingQuerySecurityInformationForUrlUtf16Async`, logging wide URLs and completing the async task with `UNREACHABLE` (`0x800704CF`), matching the UTF-8 version. - Wired `security_info_size` and `security_info_result` into slots `0x60` and `0x68`. 3. **Tests**: - Added unit test assertions covering registration/unregistration of port change callbacks and async resolution of UTF-16 security queries. ### Verification - `cargo test -p victory-hle` passed (94 tests, 0 failures). - `cargo clippy -p victory-hle` passed with zero warnings. - `cargo run -p xtask -- policy` verified (154 files ok).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:53 +00:00
github manually merged commit 64a33ec757 into gh-pr/1248/base 2026-11-26 04:24:56 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 17:59 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 64a33ec: cargo test -p victory-hle passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 17:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1248#issuecomment-7139996916) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 64a33ec: `cargo test -p victory-hle` passes, 95 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠ashrafsdrop on GitHub · 2026-11-24 18:01 UTC · original

Thanks @⁠Zipettte for testing across AMD RDNA3 hardware! Great to see it clean across both NVIDIA and AMD setups.

**@⁠ashrafsdrop** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1248#issuecomment-7140054087) Thanks [@⁠Zipettte](https://github.com/Zipettte) for testing across AMD RDNA3 hardware! Great to see it clean across both NVIDIA and AMD setups.
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1248
No description provided.