[domistream] Control host: tests first (ControlStream against ControlHost, replay, stop deadline), API stubs

Input arrives typed and byte-identical to what the client encoded; host rumble, trigger rumble, LED, motion and termination reach the client; replays, forgeries and malformed messages are dropped; the stop deadline ends a session without PERIODIC_PING. Alloc caps for the host parsers. They fail against the stubs.
This commit is contained in:
2026-12-04 12:24:14 +01:00
parent e77c5fcd83
commit 58910d00fa
4 changed files with 1181 additions and 0 deletions
+5
View File
@@ -11,9 +11,14 @@ use crate::enet::{Delivery, EnetClient, EnetConfig, EnetEvent};
use crate::{Instant, RandomSource, Result};
pub mod frame;
pub mod host;
pub mod message;
pub use frame::{ControlCipher, Direction, EncryptedFrame, parse_encrypted_frame};
pub use host::{
ClientControlMessage, ControlHost, ControlHostConfig, ControlHostEvent, StopDeadline, encode_host_message,
parse_client_message,
};
pub use message::{ClientMessage, HostMessage, MessageType, parse_host_message, parse_message};
/// Settings of one control stream. `Debug` never prints the key.