feat(net): add UDP server/client with connection management

Adds NetSocket (non-blocking UdpSocket wrapper with local_addr), NetServer
(connection tracking via HashMap, poll/broadcast/send_to_client), and NetClient
(connect/poll/send/disconnect lifecycle). Includes an integration test on
127.0.0.1:0 that validates ClientConnected, Connected, and UserData receipt
end-to-end with 50ms sleeps to ensure UDP packet delivery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-25 14:29:41 +09:00
parent 4519c5c4a6
commit 566990b7af
4 changed files with 375 additions and 0 deletions

26
Cargo.lock generated
View File

@@ -432,6 +432,21 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f"
[[package]]
name = "deferred_demo"
version = "0.1.0"
dependencies = [
"bytemuck",
"env_logger",
"log",
"pollster",
"voltex_math",
"voltex_platform",
"voltex_renderer",
"wgpu",
"winit",
]
[[package]]
name = "dispatch"
version = "0.2.0"
@@ -2029,6 +2044,13 @@ version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "voltex_ai"
version = "0.1.0"
dependencies = [
"voltex_math",
]
[[package]]
name = "voltex_asset"
version = "0.1.0"
@@ -2051,6 +2073,10 @@ dependencies = [
name = "voltex_math"
version = "0.1.0"
[[package]]
name = "voltex_net"
version = "0.1.0"
[[package]]
name = "voltex_physics"
version = "0.1.0"