mirror of
https://git.robbyzambito.me/zaprus
synced 2025-12-21 00:34:50 +00:00
Initial testing of connection message
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user