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
| 481 | * _addReplyProtoToList() if we fail to extend the existing tail object |
| 482 | * in the list of objects. */ |
| 483 | void addReplyProto(client *c, const char *s, size_t len) { |
| 484 | if (prepareClientToWrite(c) != C_OK) return; |
| 485 | if (_addReplyToBuffer(c,s,len) != C_OK) |
| 486 | _addReplyProtoToList(c,s,len); |
| 487 | } |
| 488 | |
| 489 | void addReplyProtoCString(client *c, const char *s) { |
| 490 | addReplyProto(c, s, strlen(s)); |
no test coverage detected