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

Function rioWriteBulkString

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

Write binary-safe string in the format: "$ \r\n \r\n". */

Source from the content-addressed store, hash-verified

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) {
424 size_t nwritten;
425
426 if ((nwritten = rioWriteBulkCount(r,'$',len)) == 0) return 0;
427 if (len > 0 && rioWrite(r,buf,len) == 0) return 0;
428 if (rioWrite(r,"\r\n",2) == 0) return 0;
429 return nwritten+len+2;
430}
431
432/* Write a long long value in format: "$<count>\r\n<payload>\r\n". */
433size_t rioWriteBulkLongLong(rio *r, long long l) {

Callers 13

rioWriteBulkLongLongFunction · 0.85
rioWriteBulkDoubleFunction · 0.85
migrateCommandFunction · 0.85
rioWriteBulkObjectFunction · 0.85
rewriteListObjectFunction · 0.85
rewriteSetObjectFunction · 0.85
rewriteSortedSetObjectFunction · 0.85
rewriteHashObjectFunction · 0.85
rioWriteBulkStreamIDFunction · 0.85

Calls 2

rioWriteBulkCountFunction · 0.85
rioWriteFunction · 0.85

Tested by

no test coverage detected