|
GRPC Core
4.0.0
|
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. More...
#include <slice.h>
Data Fields | |
| struct grpc_slice_refcount * | refcount |
| union { | |
| struct { | |
| uint8_t * bytes | |
| size_t length | |
| } refcounted | |
| struct { | |
| uint8_t length | |
| uint8_t bytes [(sizeof(size_t)+sizeof(uint8_t *)-1)] | |
| } inlined | |
| } | data |
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
It can have an associated ref count which has a destruction routine to be run when the ref count reaches zero (see grpc_slice_new() and grp_slice_unref()). Multiple grpc_slice values may share a ref count.
If the slice does not have a refcount, it represents an inlined small piece of data that is copied by value.
| uint8_t* grpc_slice::bytes |
| uint8_t grpc_slice::bytes[(sizeof(size_t)+sizeof(uint8_t *)-1)] |
| union { ... } grpc_slice::data |
| struct { ... } grpc_slice::inlined |
| size_t grpc_slice::length |
| uint8_t grpc_slice::length |
| struct grpc_slice_refcount* grpc_slice::refcount |
| struct { ... } grpc_slice::refcounted |
1.8.6