GRPC Core 0.10.0.0

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
stream_op.h File Reference
`#include <grpc/grpc.h>`
`#include <grpc/support/port_platform.h>`
`#include <grpc/support/slice.h>`
`#include <grpc/support/time.h>`
`#include "src/core/transport/metadata.h"`

Go to the source code of this file.

## Data Structures
struct | grpc_begin_message
struct | grpc_linked_mdelem
struct | grpc_mdelem_list
struct | grpc_metadata_batch
struct | grpc_stream_op
struct | grpc_stream_op_buffer
| A stream op buffer is a wrapper around stream operations that is dynamically extendable. More...

## Macros
#define | GRPC_SOPB_INLINE_ELEMENTS 4
#define | GRPC_WRITE_INTERNAL_COMPRESS (0x80000000u)
| Internal bit flag for grpc_begin_message's flags signaling the use of compression for the message. More...
#define | GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS)
| Mask of all valid internal flags. More...

## Typedefs
typedef enum grpc_stream_op_code | grpc_stream_op_code
typedef struct grpc_begin_message | grpc_begin_message
typedef struct grpc_linked_mdelem | grpc_linked_mdelem
typedef struct grpc_mdelem_list | grpc_mdelem_list
typedef struct grpc_metadata_batch | grpc_metadata_batch
typedef struct grpc_stream_op | grpc_stream_op
typedef struct grpc_stream_op_buffer | grpc_stream_op_buffer
| A stream op buffer is a wrapper around stream operations that is dynamically extendable. More...

## Enumerations
enum | grpc_stream_op_code { GRPC_NO_OP, GRPC_OP_METADATA, GRPC_OP_BEGIN_MESSAGE, GRPC_OP_SLICE }

## Functions
void | grpc_metadata_batch_init (grpc_metadata_batch *batch)
void | grpc_metadata_batch_destroy (grpc_metadata_batch *batch)
void | grpc_metadata_batch_merge (grpc_metadata_batch *target, grpc_metadata_batch *add)
void | grpc_metadata_batch_move (grpc_metadata_batch *dst, grpc_metadata_batch *src)
| Moves the metadata information from src to dst. More...
void | grpc_metadata_batch_link_head (grpc_metadata_batch *batch, grpc_linked_mdelem *storage)
| Add storage to the beginning of batch. More...
void | grpc_metadata_batch_link_tail (grpc_metadata_batch *batch, grpc_linked_mdelem *storage)
| Add storage to the end of batch. More...
void | grpc_metadata_batch_add_head (grpc_metadata_batch *batch, grpc_linked_mdelem *storage, grpc_mdelem *elem_to_add)
| Add elem_to_add as the first element in batch, using storage as backing storage for the linked list element. More...
void | grpc_metadata_batch_add_tail (grpc_metadata_batch *batch, grpc_linked_mdelem *storage, grpc_mdelem *elem_to_add)
| Add elem_to_add as the last element in batch, using storage as backing storage for the linked list element. More...
void | grpc_metadata_batch_filter (grpc_metadata_batch *batch, grpc_mdelem *(*filter)(void *user_data, grpc_mdelem *elem), void *user_data)
| For each element in batch, execute filter. More...
void | grpc_metadata_batch_assert_ok (grpc_metadata_batch *comd)
void | grpc_sopb_init (grpc_stream_op_buffer *sopb)
void | grpc_sopb_destroy (grpc_stream_op_buffer *sopb)
void | grpc_sopb_reset (grpc_stream_op_buffer *sopb)
void | grpc_sopb_swap (grpc_stream_op_buffer *a, grpc_stream_op_buffer *b)
void | grpc_stream_ops_unref_owned_objects (grpc_stream_op *ops, size_t nops)
void | grpc_sopb_add_no_op (grpc_stream_op_buffer *sopb)
void | grpc_sopb_add_begin_message (grpc_stream_op_buffer *sopb, gpr_uint32 length, gpr_uint32 flags)
void | grpc_sopb_add_metadata (grpc_stream_op_buffer *sopb, grpc_metadata_batch metadata)
void | grpc_sopb_add_slice (grpc_stream_op_buffer *sopb, gpr_slice slice)
void | grpc_sopb_append (grpc_stream_op_buffer *sopb, grpc_stream_op *ops, size_t nops)
void | grpc_sopb_move_to (grpc_stream_op_buffer *src, grpc_stream_op_buffer *dst)
char * | grpc_sopb_string (grpc_stream_op_buffer *sopb)

## Macro Definition Documentation

#define GRPC_SOPB_INLINE_ELEMENTS 4

#define GRPC_WRITE_INTERNAL_COMPRESS (0x80000000u)

Internal bit flag for grpc_begin_message's flags signaling the use of compression for the message.

#define GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS)

Mask of all valid internal flags.

## Typedef Documentation

typedef struct grpc_begin_message grpc_begin_message

typedef struct grpc_linked_mdelem grpc_linked_mdelem

typedef struct grpc_mdelem_list grpc_mdelem_list

typedef struct grpc_metadata_batch grpc_metadata_batch

typedef struct grpc_stream_op grpc_stream_op

typedef struct grpc_stream_op_buffer grpc_stream_op_buffer

A stream op buffer is a wrapper around stream operations that is dynamically extendable.

typedef enum grpc_stream_op_code grpc_stream_op_code

## Enumeration Type Documentation

enum grpc_stream_op_code

Enumerator
GRPC_NO_OP |
GRPC_OP_METADATA |
GRPC_OP_BEGIN_MESSAGE |
GRPC_OP_SLICE |

## Function Documentation

void grpc_metadata_batch_add_head | ( | grpc_metadata_batch * | batch,
|  | grpc_linked_mdelem * | storage,
|  | grpc_mdelem * | elem_to_add
| ) |  |

Add elem_to_add as the first element in batch, using storage as backing storage for the linked list element.

storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call. Takes ownership of elem_to_add

void grpc_metadata_batch_add_tail | ( | grpc_metadata_batch * | batch,
|  | grpc_linked_mdelem * | storage,
|  | grpc_mdelem * | elem_to_add
| ) |  |

Add elem_to_add as the last element in batch, using storage as backing storage for the linked list element.

storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call. Takes ownership of elem_to_add

void grpc_metadata_batch_assert_ok | ( | grpc_metadata_batch * | comd | ) |

void grpc_metadata_batch_destroy | ( | grpc_metadata_batch * | batch | ) |

void grpc_metadata_batch_filter | ( | grpc_metadata_batch * | batch,
|  | grpc_mdelem *(*)(void *user_data, grpc_mdelem *elem) | filter,
|  | void * | user_data
| ) |  |

For each element in batch, execute filter.

The return value from filter will be substituted for the grpc_mdelem passed to filter. If filter returns NULL, the element will be moved to the garbage list.

void grpc_metadata_batch_init | ( | grpc_metadata_batch * | batch | ) |

void grpc_metadata_batch_link_head | ( | grpc_metadata_batch * | batch,
|  | grpc_linked_mdelem * | storage
| ) |  |

Add storage to the beginning of batch.

storage->md is assumed to be valid. storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call.

void grpc_metadata_batch_link_tail | ( | grpc_metadata_batch * | batch,
|  | grpc_linked_mdelem * | storage
| ) |  |

Add storage to the end of batch.

storage->md is assumed to be valid. storage is owned by the caller and must survive for the lifetime of batch. This usually means it should be around for the lifetime of the call.

void grpc_metadata_batch_merge | ( | grpc_metadata_batch * | target,
|  | grpc_metadata_batch * | add
| ) |  |

void grpc_metadata_batch_move | ( | grpc_metadata_batch * | dst,
|  | grpc_metadata_batch * | src
| ) |  |

Moves the metadata information from src to dst.

Upon return, src is zeroed.

void grpc_sopb_add_begin_message | ( | grpc_stream_op_buffer * | sopb,
|  | gpr_uint32 | length,
|  | gpr_uint32 | flags
| ) |  |

void grpc_sopb_add_metadata | ( | grpc_stream_op_buffer * | sopb,
|  | grpc_metadata_batch | metadata
| ) |  |

void grpc_sopb_add_no_op | ( | grpc_stream_op_buffer * | sopb | ) |

void grpc_sopb_add_slice | ( | grpc_stream_op_buffer * | sopb,
|  | gpr_slice | slice
| ) |  |

void grpc_sopb_append | ( | grpc_stream_op_buffer * | sopb,
|  | grpc_stream_op * | ops,
|  | size_t | nops
| ) |  |

void grpc_sopb_destroy | ( | grpc_stream_op_buffer * | sopb | ) |

void grpc_sopb_init | ( | grpc_stream_op_buffer * | sopb | ) |

void grpc_sopb_move_to | ( | grpc_stream_op_buffer * | src,
|  | grpc_stream_op_buffer * | dst
| ) |  |

void grpc_sopb_reset | ( | grpc_stream_op_buffer * | sopb | ) |

char* grpc_sopb_string | ( | grpc_stream_op_buffer * | sopb | ) |

void grpc_sopb_swap | ( | grpc_stream_op_buffer * | a,
|  | grpc_stream_op_buffer * | b
| ) |  |

void grpc_stream_ops_unref_owned_objects | ( | grpc_stream_op * | ops,
|  | size_t | nops
| ) |  |