aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-04-14 10:44:36 +0200
committerGitHub <noreply@github.com>2023-04-14 10:44:36 +0200
commit33fc09c2a52ff4e0b51ab922cd7cdca9f7924435 (patch)
tree6490bd1a238601e48cab26c23971ad6a096dd7e9 /src/libutil/serialise.hh
parentef0b48377d0fc79d70455c402ed4df4b18cb93dd (diff)
parent214f1d67910e491e0bd7e1f09f0623fdffd82d48 (diff)
Merge pull request #8176 from tweag/rename-confusing-write-method
Rename and protect `BufferedSink::write`
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index ba6dbf619..333c254ea 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -53,7 +53,9 @@ struct BufferedSink : virtual Sink
void flush();
- virtual void write(std::string_view data) = 0;
+protected:
+
+ virtual void writeUnbuffered(std::string_view data) = 0;
};
@@ -133,7 +135,7 @@ struct FdSink : BufferedSink
~FdSink();
- void write(std::string_view data) override;
+ void writeUnbuffered(std::string_view data) override;
bool good() override;
@@ -520,7 +522,7 @@ struct FramedSink : nix::BufferedSink
}
}
- void write(std::string_view data) override
+ void writeUnbuffered(std::string_view data) override
{
/* Don't send more data if the remote has
encountered an error. */