feat(net): add voltex_net crate with packet serialization

Introduces the voltex_net crate (no external dependencies) with a binary
Packet protocol over UDP. Supports 6 variants (Connect, Accept, Disconnect,
Ping, Pong, UserData) with a 4-byte header (type_id u8, payload_len u16 LE,
reserved u8) and per-variant payload encoding. Includes 7 unit tests covering
all roundtrips and invalid-type error handling.

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

View File

@@ -0,0 +1,9 @@
pub mod packet;
pub mod socket;
pub mod server;
pub mod client;
pub use packet::Packet;
pub use socket::NetSocket;
pub use server::{NetServer, ServerEvent, ClientInfo};
pub use client::{NetClient, ClientEvent};