add treetest protocol simulator and ui

This commit is contained in:
Michael Mikovsky
2026-04-24 16:19:42 -06:00
parent 555663bd3d
commit 2b633ce019
31 changed files with 2760 additions and 4254 deletions
+10 -1
View File
@@ -60,7 +60,16 @@ impl ProtocolEndpoint {
header: PacketHeader,
message: DataMessage,
) -> Result<EndpointOutcome, EndpointError> {
let key = HookKey::new(self.path.clone(), header.hook_id.expect("validated"));
let hook_id = header.hook_id.expect("validated");
let key = self
.hooks
.active(&HookKey::new(self.path.clone(), hook_id))
.map(|_| HookKey::new(self.path.clone(), hook_id))
.or_else(|| {
self.hooks
.find_active_key_by_peer(hook_id, &header.src_path)
})
.unwrap_or_else(|| HookKey::new(self.path.clone(), hook_id));
if self.hooks.active(&key).is_none() {
let matches = self.hooks.pending(&key).is_some_and(|pending| {