Write binary-safe string in the format: "$ \r\n \r\n". */
| 465 | |
| 466 | /* Write binary-safe string in the format: "$<count>\r\n<payload>\r\n". */ |
| 467 | size_t rioWriteBulkString(rio *r, const char *buf, size_t len) { |
| 468 | size_t nwritten; |
| 469 | |
| 470 | if ((nwritten = rioWriteBulkCount(r,'$',len)) == 0) return 0; |
| 471 | if (len > 0 && rioWrite(r,buf,len) == 0) return 0; |
| 472 | if (rioWrite(r,"\r\n",2) == 0) return 0; |
| 473 | return nwritten+len+2; |
| 474 | } |
| 475 | |
| 476 | /* Write a long long value in format: "$<count>\r\n<payload>\r\n". */ |
| 477 | size_t rioWriteBulkLongLong(rio *r, long long l) { |
no test coverage detected