fix(ab-transport): harden Task 7 codecs (read status, 32-bit start instance, empty-More, size range)

This commit is contained in:
Joseph Doherty
2026-10-07 16:06:49 -04:00
parent 5f86b370f7
commit 6d16765804
6 changed files with 55 additions and 13 deletions
@@ -29,6 +29,9 @@ public static class ConnectionManagerServices
public static byte[] ForwardOpen(ForwardOpenParams p)
{
if (p.ConnectionSize < 1 || p.ConnectionSize > (p.Large ? 0xFFFF : 0x1FF))
throw new ArgumentOutOfRangeException(nameof(p), p.ConnectionSize,
p.Large ? "Large connection size must be 1..65535." : "Regular connection size must be 1..511.");
var connPath = new CipWriter().Bytes(p.Route).Bytes(CipPath.MessageRouter).ToArray();
var w = new CipWriter().U8(p.Large ? (byte)0x5B : (byte)0x54).U8(2).Bytes(CipPath.ConnectionManager)
.U8(PriorityTick).U8(TimeoutTicks)