mirror of
https://git.robbyzambito.me/zits
synced 2026-02-04 11:44:48 +00:00
made some progress on subscriptions
This commit is contained in:
@@ -66,12 +66,14 @@ pub const ClientState = struct {
|
||||
},
|
||||
}
|
||||
}
|
||||
self.task.cancel(io);
|
||||
}
|
||||
|
||||
pub fn deinit(self: *ClientState, io: std.Io, allocator: std.mem.Allocator) void {
|
||||
self.task.cancel(io);
|
||||
self.connect.deinit();
|
||||
allocator.destroy(self.recv_queue);
|
||||
_ = allocator;
|
||||
// allocator.destroy(self.recv_queue);
|
||||
}
|
||||
|
||||
/// Return true if the value was put in the clients buffer to process, else false.
|
||||
@@ -95,14 +97,11 @@ fn writeOk(out: *std.Io.Writer) !void {
|
||||
}
|
||||
|
||||
fn writePong(out: *std.Io.Writer) !void {
|
||||
std.debug.print("out pointer: {*}\n", .{out});
|
||||
std.debug.print("writing pong\n", .{});
|
||||
_ = try out.write("PONG\r\n");
|
||||
try out.flush();
|
||||
}
|
||||
|
||||
pub fn writeInfo(out: *std.Io.Writer, info: Message.ServerInfo) !void {
|
||||
std.debug.print("writing info: {any}\n", .{info});
|
||||
_ = try out.write("INFO ");
|
||||
try std.json.Stringify.value(info, .{}, out);
|
||||
_ = try out.write("\r\n");
|
||||
|
||||
Reference in New Issue
Block a user