aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClientInternal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-15 01:12:08 +0100
committerMax Kellermann <max@duempel.org>2013-01-15 10:59:28 +0100
commit3e035279300d1ac238f2f063e5ca5f478923d7cb (patch)
treeac49f4cbcf26317ac6836c1d77966287815eaf1f /src/ClientInternal.hxx
parent4fa724461e558561402b05bd4eadf8c7b6874556 (diff)
downloadmpd-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.hxx12
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;