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
| 393 | * _addReplyProtoToList() if we fail to extend the existing tail object |
| 394 | * in the list of objects. */ |
| 395 | void 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: |
no test coverage detected