Write binary-safe string in the format: "$ \r\n \r\n". */
| 421 | |
| 422 | /* Write binary-safe string in the format: "$<count>\r\n<payload>\r\n". */ |
| 423 | size_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". */ |
| 433 | size_t rioWriteBulkLongLong(rio *r, long long l) { |
no test coverage detected