Go to the documentation of this file.
19 #ifndef GRPC_SLICE_BUFFER_H
20 #define GRPC_SLICE_BUFFER_H
GPRAPI void grpc_slice_buffer_destroy(grpc_slice_buffer *sb)
destroy a slice buffer - unrefs any held elements
GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst)
move all of the elements of src into dst
GPRAPI void grpc_slice_buffer_move_first_no_ref(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst)
move the first n bytes of src into dst without adding references
GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst)
move the first n bytes of src into dst
GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice slice)
add an element to a slice buffer - takes ownership of the slice and returns the index of the slice.
GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices, size_t n)
GPRAPI void grpc_slice_buffer_pop(grpc_slice_buffer *sb)
pop the last buffer, but don't unref it
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice_type.h:63
GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice)
Add an element to a slice buffer - takes ownership of the slice.
GPRAPI void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb)
clear a slice buffer, unref all elements
GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer *sb)
initialize a slice buffer
GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, grpc_slice_buffer *garbage)
remove n bytes from the end of a slice buffer
GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *sb)
take the first slice in the slice buffer
GPRAPI void grpc_slice_buffer_move_first_into_buffer(grpc_slice_buffer *src, size_t n, void *dst)
move the first n bytes of src into dst (copying them)
GPRAPI void grpc_slice_buffer_undo_take_first(grpc_slice_buffer *sb, grpc_slice slice)
undo the above with (a possibly different) slice
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice_type.h:81
GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b)
swap the contents of two slice buffers
GPRAPI uint8_t * grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len)
add a very small (less than 8 bytes) amount of data to the end of a slice buffer: returns a pointer i...