GRPC Core  0.10.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
byte_buffer_reader.c File Reference
#include <grpc/byte_buffer_reader.h>
#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/slice_buffer.h>
#include <grpc/byte_buffer.h>
#include "src/core/compression/message_compress.h"

Functions

void grpc_byte_buffer_reader_init (grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer)
 Initialize reader to read over buffer. More...
 
void grpc_byte_buffer_reader_destroy (grpc_byte_buffer_reader *reader)
 Cleanup and destroy reader. More...
 
int grpc_byte_buffer_reader_next (grpc_byte_buffer_reader *reader, gpr_slice *slice)
 Updates slice with the next piece of data from from reader and returns. More...
 

Function Documentation

void grpc_byte_buffer_reader_destroy ( grpc_byte_buffer_reader reader)

Cleanup and destroy reader.

void grpc_byte_buffer_reader_init ( grpc_byte_buffer_reader reader,
grpc_byte_buffer buffer 
)

Initialize reader to read over buffer.

int grpc_byte_buffer_reader_next ( grpc_byte_buffer_reader reader,
gpr_slice slice 
)

Updates slice with the next piece of data from from reader and returns.

  1. Returns 0 at the end of the stream. Caller is responsible for calling gpr_slice_unref on the result.