Changed variable names for clearer structure.

This commit is contained in:
Jakob Friedl
2025-07-22 21:31:18 +02:00
parent 725696ffa5
commit 36719dd7f0
11 changed files with 38 additions and 61 deletions

View File

@@ -125,4 +125,16 @@ proc getVarLengthMetadata*(unpacker: Unpacker): string =
return ""
# Read content
return unpacker.getBytes(int(length)).toString()
return unpacker.getBytes(int(length)).toString()
proc packHeader*(packer: Packer, header: Header, bodySize: uint32): seq[byte] =
packer
.add(header.magic)
.add(header.version)
.add(header.packetType)
.add(header.flags)
.add(header.seqNr)
.add(bodySize)
.addData(header.hmac)
return packer.pack()