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

Function addReplyProto

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

This low level function just adds whatever protocol you send it to the * client buffer, trying the static buffer initially, and using the string * of objects if not possible. * * It is efficient because does not create an SDS object nor an Redis object * if not needed. The object will only be created by calling * _addReplyProtoToList() if we fail to extend the existing tail object * in the

Source from the content-addressed store, hash-verified

393 * _addReplyProtoToList() if we fail to extend the existing tail object
394 * in the list of objects. */
395void addReplyProto(client *c, const char *s, size_t len) {
396 if (prepareClientToWrite(c) != C_OK) return;
397 if (_addReplyToBuffer(c,s,len) != C_OK)
398 _addReplyProtoToList(c,s,len);
399}
400
401/* Low level function called by the addReplyError...() functions.
402 * It emits the protocol for a Redis error, in the form:

Callers 15

addReplyGopherItemFunction · 0.85
sendTrackingMessageFunction · 0.85
addReplyErrorLengthFunction · 0.85
addReplyStatusLengthFunction · 0.85
addReplyDoubleFunction · 0.85
addReplyBigNumFunction · 0.85
addReplyHumanLongDoubleFunction · 0.85
addReplyNullFunction · 0.85
addReplyBoolFunction · 0.85
addReplyNullArrayFunction · 0.85

Calls 3

prepareClientToWriteFunction · 0.85
_addReplyToBufferFunction · 0.85
_addReplyProtoToListFunction · 0.85

Tested by

no test coverage detected