Initial testing of connection message

This commit is contained in:
2025-04-04 23:12:08 -04:00
parent 7b07520adb
commit efcd866d6c
3 changed files with 45 additions and 10 deletions

View File

@@ -79,8 +79,14 @@ pub const SaprusMessage = union(SaprusPacketType) {
try base64Enc.encodeWriter(buf_w, payload);
// Write the packet body to the output writer.
try w.writeStructEndian(header, .big);
try w.writeInt(u16, @intCast(payload_list.items.len), .big);
// try w.writeStructEndian(header, .big);
const header_bytes = std.mem.asBytes(&header);
try w.writeAll(header_bytes[0 .. header_bytes.len - 2]);
try w.writeAll(payload_list.items);
}