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

Function rioWriteBulkCount

app/redis-6.2.6/src/rio.c:410–420  ·  view source on GitHub ↗

Write multi bulk count in the format: "* \r\n". */

Source from the content-addressed store, hash-verified

408
409/* Write multi bulk count in the format: "*<count>\r\n". */
410size_t rioWriteBulkCount(rio *r, char prefix, long count) {
411 char cbuf[128];
412 int clen;
413
414 cbuf[0] = prefix;
415 clen = 1+ll2string(cbuf+1,sizeof(cbuf)-1,count);
416 cbuf[clen++] = '\r';
417 cbuf[clen++] = '\n';
418 if (rioWrite(r,cbuf,clen) == 0) return 0;
419 return clen;
420}
421
422/* Write binary-safe string in the format: "$<count>\r\n<payload>\r\n". */
423size_t rioWriteBulkString(rio *r, const char *buf, size_t len) {

Callers 10

rioWriteBulkStringFunction · 0.85
migrateCommandFunction · 0.85
rewriteListObjectFunction · 0.85
rewriteSetObjectFunction · 0.85
rewriteSortedSetObjectFunction · 0.85
rewriteHashObjectFunction · 0.85
rewriteStreamObjectFunction · 0.85
RM_EmitAOFFunction · 0.85

Calls 2

ll2stringFunction · 0.85
rioWriteFunction · 0.85

Tested by

no test coverage detected