| ... | @@ -129,6 +129,10 @@ pub const Stream = struct { | ... | @@ -129,6 +129,10 @@ pub const Stream = struct { |
| 129 | sys.close(@intCast(@intFromEnum(s.socket))) catch {}; | 129 | sys.close(@intCast(@intFromEnum(s.socket))) catch {}; |
| 130 | } | 130 | } |
| 131 | | 131 | |
| | 132 | pub fn shutdown(s: Stream, how: sys.SHUT) !void { |
| | 133 | return sys.shutdown(@intCast(@intFromEnum(s.socket)), how); |
| | 134 | } |
| | 135 | |
| 132 | pub const ReadError = switch (builtin.target.os.tag) { | 136 | pub const ReadError = switch (builtin.target.os.tag) { |
| 133 | .linux => sys.errno.Error, | 137 | .linux => sys.errno.Error, |
| 134 | else => @compileError("TODO"), | 138 | else => @compileError("TODO"), |