| ... | @@ -1154,6 +1154,11 @@ pub const Stream = struct { | ... | @@ -1154,6 +1154,11 @@ pub const Stream = struct { |
| 1154 | s.* = undefined; | 1154 | s.* = undefined; |
| 1155 | } | 1155 | } |
| 1156 | | 1156 | |
| | 1157 | /// Same as `close` but doesn't try to set `Stream` to `undefined`. |
| | 1158 | pub fn closeConst(s: *const Stream, io: Io) void { |
| | 1159 | io.vtable.netClose(io.userdata, s.socket.handle); |
| | 1160 | } |
| | 1161 | |
| 1157 | pub const Reader = struct { | 1162 | pub const Reader = struct { |
| 1158 | io: Io, | 1163 | io: Io, |
| 1159 | interface: Io.Reader, | 1164 | interface: Io.Reader, |