libutil: make Fd{Sink,Source} io buffer shareable

we will need this during RemoteStore wire asyncification to be able to
use the old synchronous serializers. alternatively we could define all
serializers on the async types as well, but that'd be slow and far too
much unnecessarily duplicated code (that will be deleted soon anyway).

Change-Id: I6e4f334025844b808a697ddcd8f80ddcd8c3fc9c
This commit is contained in:
eldritch horrors
2025-06-17 14:34:05 +02:00
parent fc18a6d170
commit 6f64e1b133
+2
View File
@@ -125,6 +125,7 @@ struct FdSink : BufferedSink
FdSink() : fd(-1) { }
FdSink(int fd) : fd(fd) { }
FdSink(int fd, ref<IoBuffer> buffer) : BufferedSink(buffer), fd(fd) {}
FdSink(const FdSink &) = delete;
FdSink(FdSink &&) = delete;
FdSink & operator=(const FdSink &) = delete;
@@ -154,6 +155,7 @@ struct FdSource : BufferedSource
FdSource() : fd(-1) { }
FdSource(int fd) : fd(fd) { }
FdSource(int fd, ref<IoBuffer> buffer) : BufferedSource(buffer), fd(fd) {}
FdSource(const FdSource &) = delete;
FdSource(FdSource &&) = delete;
FdSource & operator=(const FdSource &) = delete;