Function anjay_ret_bytes_append
Defined in File io.h
Function Documentation
-
int anjay_ret_bytes_append(anjay_ret_bytes_ctx_t *ctx, const void *data, size_t length)
Appends a chunk of the data blob to the response message.
Note: total number of bytes returned by multiple consecutive successful calls to this function must be equal to the value passed as the length parameter to anjay_ret_bytes_begin that initialized the
ctx, otherwise the behavior is undefined.- Parameters:
ctx – Context to operate on.
data – Data buffer.
length – Number of bytes available in the
databuffer.
- Returns:
0 on success, a negative value in case of error.