| author | |
| committer | |
| log | 426a377c7b6a64092ab0b45710dc428da60557a1 |
| tree | 1c1108b36cdf7f0e018bd4da3a842b1d2a7b8e80 |
| parent | 80069c1e69140ac240e5397270ea919ddbfce89b |
useful for resource management1 files changed, 5 insertions(+), 0 deletions(-)
lib/std/Io/net.zig+5| ... | ... | @@ -1154,6 +1154,11 @@ pub const Stream = struct { |
| 1154 | 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 | 1162 | pub const Reader = struct { |
| 1158 | 1163 | io: Io, |
| 1159 | 1164 | interface: Io.Reader, |