From 45feccbad8c7306c15137a6003f3df1183d9c2a9 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Wed, 7 Jan 2026 22:48:50 -0500 Subject: WAY FASTER but doesn't send all? Seems to not flush the last message --- src/Server/message.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Server/message.zig') diff --git a/src/Server/message.zig b/src/Server/message.zig index f22410f..8005453 100644 --- a/src/Server/message.zig +++ b/src/Server/message.zig @@ -5,6 +5,8 @@ const Reader = std.Io.Reader; const Payload = @import("Payload.zig"); +pub const parse = @import("parse.zig"); + pub const Control = @typeInfo(Message).@"union".tag_type.?; pub const Message = union(enum) { @@ -108,14 +110,13 @@ pub const Message = union(enum) { /// The message payload data. payload: []const u8, - pub fn toMsg(self: Pub, alloc: Allocator, sid: []const u8) !Msg { - const res: Msg = .{ + pub fn toMsg(self: Pub, sid: []const u8) Msg { + return .{ .subject = self.subject, .sid = sid, .reply_to = self.reply_to, .payload = self.payload, }; - return res.dupe(alloc); } }; pub const HPub = struct { -- cgit