19 #ifndef GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H 20 #define GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H 30 #define GRPC_WRITE_INTERNAL_COMPRESS (0x80000000u) 32 #define GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS) 65 uint32_t
length()
const {
return length_; }
66 uint32_t
flags()
const {
return flags_; }
75 const uint32_t length_;
grpc_error * Pull(grpc_slice *slice) override
uint32_t length() const
Definition: byte_stream.h:65
void Shutdown(grpc_error *error) override
SliceBufferByteStream(grpc_slice_buffer *slice_buffer, uint32_t flags)
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. ...
Definition: slice.h:60
ByteStreamCache(OrphanablePtr< ByteStream > underlying_stream)
Definition: error_internal.h:39
uint32_t flags() const
Definition: byte_stream.h:66
Definition: byte_stream.h:120
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:68
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
Definition: orphanable.h:43
ByteStream(uint32_t length, uint32_t flags)
Definition: byte_stream.h:71
Internal thread interface.
Definition: backoff.h:26
Definition: byte_stream.h:118
Definition: byte_stream.h:36
virtual ~ByteStream()
Definition: byte_stream.h:38
virtual grpc_error * Pull(grpc_slice *slice)=0
grpc_slice_buffer * cache_buffer()
Definition: byte_stream.h:149
void set_flags(uint32_t flags)
Definition: byte_stream.h:68
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
#define GRPC_ERROR_NONE
The following "special" errors can be propagated without allocating memory.
Definition: error.h:125
Definition: byte_stream.h:85
virtual bool Next(size_t max_size_hint, grpc_closure *on_complete)=0
void Shutdown(grpc_error *error) override
bool Next(size_t max_size_hint, grpc_closure *on_complete) override
grpc_error * Pull(grpc_slice *slice) override
virtual void Shutdown(grpc_error *error)=0
CachingByteStream(ByteStreamCache *cache)
bool Next(size_t max_size_hint, grpc_closure *on_complete) override