Obsolete
/
libipc-old
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
libipc-old/zig-impl/other/example-hexdump.zig

9 lines
336 B
Zig
Raw Normal View History

2023-01-20 04:04:12 +01:00
const msg_type = @intToEnum(Message.Type, try reader.readByte());
try writer.writeByte(@enumToInt(self.t));
var hexbuf: [4000]u8 = undefined;
var hexfbs = std.io.fixedBufferStream(&hexbuf);
var hexwriter = hexfbs.writer();
try hexdump.hexdump(hexwriter, "Message.read input buffer", buffer);
print("{s}\n", .{hexfbs.getWritten()});