MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getClientOutputBufferMemoryUsage

Function getClientOutputBufferMemoryUsage

app/redis-6.2.6/src/networking.c:3169–3172  ·  view source on GitHub ↗

This function returns the number of bytes that Redis is * using to store the reply still not read by the client. * * Note: this function is very fast so can be called as many time as * the caller wishes. The main usage of this function currently is * enforcing the client output length limits. */

Source from the content-addressed store, hash-verified

3167 * the caller wishes. The main usage of this function currently is
3168 * enforcing the client output length limits. */
3169unsigned long getClientOutputBufferMemoryUsage(client *c) {
3170 unsigned long list_item_size = sizeof(listNode) + sizeof(clientReplyBlock);
3171 return c->reply_bytes + (list_item_size*listLength(c->reply));
3172}
3173
3174/* Get the class of a client, used in order to enforce limits to different
3175 * classes of clients.

Calls

no outgoing calls

Tested by

no test coverage detected