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