Track the length of the client pending output buffers (still to transfer) in a new field in the client structure.

This commit is contained in:
antirez
2011-12-25 16:32:54 +01:00
parent f7ccc4830b
commit 3853c16839
3 changed files with 31 additions and 1 deletions

View File

@ -305,6 +305,7 @@ typedef struct redisClient {
int multibulklen; /* number of multi bulk arguments left to read */
long bulklen; /* length of bulk argument in multi bulk request */
list *reply;
unsigned long reply_bytes; /* Tot bytes of objects in reply list */
int sentlen;
time_t lastinteraction; /* time of the last interaction, used for timeout */
int flags; /* REDIS_SLAVE | REDIS_MONITOR | REDIS_MULTI ... */
@ -783,6 +784,7 @@ sds getClientInfoString(redisClient *client);
sds getAllClientsInfoString(void);
void rewriteClientCommandVector(redisClient *c, int argc, ...);
void rewriteClientCommandArgument(redisClient *c, int i, robj *newval);
unsigned long getClientOutputBufferMemoryUsage(redisClient *c);
#ifdef __GNUC__
void addReplyErrorFormat(redisClient *c, const char *fmt, ...)