while (true) {
const received_bytes = try std.posix.recvfrom(socket, buffer[0..], 0, null, null);
try streams.reset();
try streams.buff.appendSlice(std.mem.bytesAsSlice(u8, buffer[0..received_bytes]));
std.debug.print("Received {d} bytes: {s}\n", .{ received_bytes, buffer[0..received_bytes] });
_ = try streams.readByte();
const time = streams.readInt64B();
std.debug.print("raknet time is {!}\n", .{time});
var i: usize = 0;
var MAGIC: []u8 = undefined;
while (i < 16) : (i += 1) {
MAGIC[i] = try streams.readByte2();
}
std.debug.print("raknet magic is {x}\n", .{MAGIC});
}
It crashes in the magic line, do you have a solution, I am trying to convert it to HEX