summaryrefslogtreecommitdiff
path: root/src/client/Response.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-12 14:17:35 +0200
committerMax Kellermann <max@musicpd.org>2019-08-12 14:17:35 +0200
commit989790e7f172cf74c3adabb8971f62ba0311ab3a (patch)
treef7986cd4e1c2bb01e63887ec9d423c2b97b0eb23 /src/client/Response.cxx
parent831bc711ca88b4b243b2a09384ecb31a03cdcc93 (diff)
client/Response: add method WriteBinary()
Move code from read_stream_art().
Diffstat (limited to 'src/client/Response.cxx')
-rw-r--r--src/client/Response.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/Response.cxx b/src/client/Response.cxx
index 7577d6956..9d85a27e6 100644
--- a/src/client/Response.cxx
+++ b/src/client/Response.cxx
@@ -56,6 +56,14 @@ Response::Format(const char *fmt, ...) noexcept
return success;
}
+bool
+Response::WriteBinary(ConstBuffer<void> payload) noexcept
+{
+ return Format("binary: %zu\n", payload.size) &&
+ Write(payload.data, payload.size) &&
+ Write("\n");
+}
+
void
Response::Error(enum ack code, const char *msg) noexcept
{