Okai, i also tried using:
var a = try reader.readBytesNoEof(@sizeOf(HandShake));
const resp_handshake = HandShake.createFromBuffer(&a);
and seems to also work, so the problem had to be:
const response: []u8 = try reader.readAllAlloc(allocator, std.math.maxInt(usize));
which might be allocating to many wasted memory.