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