fix(ab-transport): harden Task 7 codecs (read status, 32-bit start instance, empty-More, size range)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user