A websocket implementation for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #79 from Cohors1316/master

std.io -> std.Io

authored by

Karl Seguin and committed by
GitHub
(Sep 14, 2025, 10:03 AM +0800) f7e2c02b 5cfef4a7

+4 -4
+1 -1
src/buffer.zig
··· 42 42 } 43 43 } 44 44 45 - pub fn drain(io_w: *std.io.Writer, data: []const []const u8, splat: usize) error{WriteFailed}!usize { 45 + pub fn drain(io_w: *std.Io.Writer, data: []const []const u8, splat: usize) error{WriteFailed}!usize { 46 46 std.debug.print("drain: {d}\n", .{data[0].len}); 47 47 _ = splat; 48 48 const self: *Writer = @alignCast(@fieldParentPtr("interface", io_w));
+3 -3
src/server/server.zig
··· 1466 1466 conn: *Conn, 1467 1467 op_code: OpCode, 1468 1468 allocator: Allocator, 1469 - buf: std.ArrayListUnmanaged(u8), 1470 - interface: std.io.Writer, 1469 + buf: std.ArrayList(u8), 1470 + interface: std.Io.Writer, 1471 1471 1472 1472 pub const Error = Allocator.Error; 1473 1473 ··· 1475 1475 self.buf.deinit(self.allocator); 1476 1476 } 1477 1477 1478 - pub fn drain(io_w: *std.io.Writer, data: []const []const u8, splat: usize) error{WriteFailed}!usize { 1478 + pub fn drain(io_w: *std.Io.Writer, data: []const []const u8, splat: usize) error{WriteFailed}!usize { 1479 1479 _ = splat; 1480 1480 const self: *Writer = @alignCast(@fieldParentPtr("interface", io_w)); 1481 1481 self.buf.appendSlice(self.allocator, data[0]) catch return error.WriteFailed;