diff options
| author | Robby Zambito <contact@robbyzambito.me> | 2026-01-07 22:48:50 -0500 |
|---|---|---|
| committer | Robby Zambito <contact@robbyzambito.me> | 2026-01-07 23:19:19 -0500 |
| commit | 45feccbad8c7306c15137a6003f3df1183d9c2a9 (patch) | |
| tree | 5a541a2e45eb2fbe8f0ec4ba3da0829d029ccd45 /src/Server/message.zig | |
| parent | 96a3705069cf33a00ded143f876734c2a045cf1e (diff) | |
WAY FASTER but doesn't send all?
Seems to not flush the last message
Diffstat (limited to 'src/Server/message.zig')
| -rw-r--r-- | src/Server/message.zig | 7 |
1 files changed, 4 insertions, 3 deletions
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 { |
