blob: b6e2d903721bdc3425b8e8a6d01863773783bc57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
const std = @import("std");
const Self = @This();
server: std.Io.net.Server,
io: std.Io.Threaded,
pub fn init(
gpa: std.mem.Allocator,
address: std.Io.net.IpAddress,
) !Self {
var io: std.Io.Threaded = .init(gpa, .{});
return .{
.io = io,
.server = try address.listen(io.io(), .{ .reuse_address = true }),
};
}
pub fn serve(_: *Self) !void {}
|