Go to the documentation of this file.
19 #ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
20 #define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices)
Returns a RAW byte buffer instance over the given slices (up to nslices).
GRPCAPI int grpc_byte_buffer_reader_peek(grpc_byte_buffer_reader *reader, grpc_slice **slice)
EXPERIMENTAL API - This function may be removed and changed, in the future.
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:57
GRPCAPI grpc_byte_buffer * grpc_byte_buffer_copy(grpc_byte_buffer *bb)
Copies input byte buffer bb.
GRPCAPI grpc_byte_buffer * grpc_raw_compressed_byte_buffer_create(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression)
Returns a compressed RAW byte buffer instance over the given slices (up to nslices).
GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_from_reader(grpc_byte_buffer_reader *reader)
Returns a RAW byte buffer instance from the output of reader.
Definition: grpc_types.h:40
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer)
Initialize reader to read over buffer.
GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, grpc_slice *slice)
Updates slice with the next piece of data from from reader and returns.
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer)
Destroys byte_buffer deallocating all its memory.
GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader)
Merge all data from reader into single slice.
GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb)
Returns the size of the given byte buffer, in bytes.
GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader)
Cleanup and destroy reader.
Definition: byte_buffer_reader.h:28