Functions
byte_buffer.cc File Reference
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <grpc/byte_buffer.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_refcount.h"
Include dependency graph for byte_buffer.cc:

Go to the source code of this file.

Functions

grpc_byte_buffergrpc_byte_buffer_copy (grpc_byte_buffer *bb)
 
void grpc_byte_buffer_destroy (grpc_byte_buffer *bb)
 
size_t grpc_byte_buffer_length (grpc_byte_buffer *bb)
 
grpc_byte_buffergrpc_raw_byte_buffer_create (grpc_slice *slices, size_t nslices)
 
grpc_byte_buffergrpc_raw_byte_buffer_from_reader (grpc_byte_buffer_reader *reader)
 
grpc_byte_buffergrpc_raw_compressed_byte_buffer_create (grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression)
 

Function Documentation

◆ grpc_byte_buffer_copy()

grpc_byte_buffer* grpc_byte_buffer_copy ( grpc_byte_buffer bb)

Copies input byte buffer bb.

Increases the reference count of all the source slices. The user is responsible for calling grpc_byte_buffer_destroy over the returned copy.

Definition at line 71 of file byte_buffer.cc.

◆ grpc_byte_buffer_destroy()

void grpc_byte_buffer_destroy ( grpc_byte_buffer bb)

Destroys byte_buffer deallocating all its memory.

Definition at line 81 of file byte_buffer.cc.

◆ grpc_byte_buffer_length()

size_t grpc_byte_buffer_length ( grpc_byte_buffer bb)

Returns the size of the given byte buffer, in bytes.

Definition at line 92 of file byte_buffer.cc.

◆ grpc_raw_byte_buffer_create()

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).

Increases the reference count for all slices processed. The user is responsible for invoking grpc_byte_buffer_destroy on the returned instance.

Definition at line 34 of file byte_buffer.cc.

◆ grpc_raw_byte_buffer_from_reader()

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 at line 56 of file byte_buffer.cc.

◆ grpc_raw_compressed_byte_buffer_create()

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). The compression argument defines the compression algorithm used to generate the data in slices.

Increases the reference count for all slices processed. The user is responsible for invoking grpc_byte_buffer_destroy on the returned instance.

Definition at line 40 of file byte_buffer.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:05