From 0cc8f357d8f44fcfccd141c078d34ed4530fec5b Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 12 Mar 2024 14:09:53 +0100 Subject: io: add dynstream a new abstraction that we derive posixstream from; hopefully with time we can get rid of std/streams --- src/io/bufstream.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/io/bufstream.nim') diff --git a/src/io/bufstream.nim b/src/io/bufstream.nim index eb9d6d6b..0558b61c 100644 --- a/src/io/bufstream.nim +++ b/src/io/bufstream.nim @@ -1,7 +1,8 @@ +import io/dynstream import io/posixstream type - BufStream* = ref object of PosixStream + BufStream* = ref object of DynStream source*: PosixStream registerFun: proc(fd: int) registered: bool @@ -46,7 +47,6 @@ proc flushWrite*(s: BufStream): bool = proc newBufStream*(ps: PosixStream, registerFun: proc(fd: int)): BufStream = result = BufStream( - fd: ps.fd, source: ps, blocking: ps.blocking, registerFun: registerFun -- cgit 1.4.1-2-gfad0