From 3e035279300d1ac238f2f063e5ca5f478923d7cb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Jan 2013 01:12:08 +0100 Subject: Client: move output buffer code to new class PeakBuffer --- src/ClientInternal.hxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/ClientInternal.hxx') diff --git a/src/ClientInternal.hxx b/src/ClientInternal.hxx index 7d2edf04..009568ed 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 #include @@ -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; -- cgit v1.2.3