diff --git a/src/http/server.zig b/src/http/server.zig index 21a83be..b24ae75 100644 --- a/src/http/server.zig +++ b/src/http/server.zig @@ -38,7 +38,7 @@ pub const Stream = struct { os.closeSocket(self.socket); } - pub const ReadError = os.RecvFromError; + pub const ReadError = os.ReadError; pub const WriteError = os.SendError; pub const Reader = std.io.Reader(Stream, ReadError, read); @@ -48,7 +48,7 @@ pub const Stream = struct { if (std.io.is_async) @compileError("TODO: async not supported"); if (self.kind != .tcp) @panic("TODO"); - return os.recv(self.socket, buffer, 0); + return os.read(self.socket, buffer); } pub fn write(self: Stream, buffer: []const u8) WriteError!usize {