x64-httpd/eagain.zig
2025-05-18 13:13:13 +00:00

12 lines
322 B
Zig

const std = @import("std");
const path = "eagain.sock";
const spam: [0xffff]u8 = undefined;
pub fn main() !void {
const stream = try std.net.connectUnixSocket(path);
_ = try std.posix.fcntl(stream.handle, std.c.F.SETFL, std.c.SOCK.NONBLOCK);
for (0..99999) |_| {
_ = try stream.write(&spam);
}
}