diff options
author | Max Kellermann <max@duempel.org> | 2013-01-15 01:12:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-15 10:59:28 +0100 |
commit | 3e035279300d1ac238f2f063e5ca5f478923d7cb (patch) | |
tree | ac49f4cbcf26317ac6836c1d77966287815eaf1f /src/ClientInternal.hxx | |
parent | 4fa724461e558561402b05bd4eadf8c7b6874556 (diff) | |
download | mpd-3e035279300d1ac238f2f063e5ca5f478923d7cb.tar.gz mpd-3e035279300d1ac238f2f063e5ca5f478923d7cb.tar.xz mpd-3e035279300d1ac238f2f063e5ca5f478923d7cb.zip |
Client: move output buffer code to new class PeakBuffer
Diffstat (limited to '')
-rw-r--r-- | src/ClientInternal.hxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ClientInternal.hxx b/src/ClientInternal.hxx index 7d2edf046..009568ed4 100644 --- a/src/ClientInternal.hxx +++ b/src/ClientInternal.hxx @@ -25,6 +25,7 @@ #include "ClientMessage.hxx" #include "CommandListBuilder.hxx" #include "command.h" +#include "util/PeakBuffer.hxx" #include <set> #include <string> @@ -40,12 +41,8 @@ enum { CLIENT_MAX_MESSAGES = 64, }; -struct deferred_buffer { - size_t size; - char data[sizeof(long)]; -}; - struct Partition; +class PeakBuffer; class Client { public: @@ -71,12 +68,9 @@ public: CommandListBuilder cmd_list; - GQueue *deferred_send; /* for output if client is slow */ - size_t deferred_bytes; /* mem deferred_send consumes */ unsigned int num; /* client number */ - char send_buf[16384]; - size_t send_buf_used; /* bytes used this instance */ + PeakBuffer output_buffer; /** is this client waiting for an "idle" response? */ bool idle_waiting; |