GRPC Core  18.0.0
incoming_metadata.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H
20 #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H
21 
23 
25 
28  : arena(arena) {
31  }
34  }
35 
36  static constexpr size_t kPreallocatedMDElem = 10;
37 
39  size_t size = 0; // total size of metadata.
40  size_t count = 0; // minimum of count of metadata and kPreallocatedMDElem.
41  // These preallocated mdelems are used while count < kPreallocatedMDElem.
44 };
45 
48 
57 
58 #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */
Definition: arena.h:44
int64_t grpc_millis
Definition: exec_ctx.h:37
#define GRPC_MILLIS_INF_FUTURE
Definition: exec_ctx.h:39
#define GRPC_MUST_USE_RESULT
Definition: port_platform.h:524
grpc_error_handle grpc_chttp2_incoming_metadata_buffer_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem elem) GRPC_MUST_USE_RESULT
Definition: incoming_metadata.cc:30
grpc_error_handle grpc_chttp2_incoming_metadata_buffer_replace_or_add(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_mdelem elem) GRPC_MUST_USE_RESULT
Definition: incoming_metadata.cc:45
void grpc_chttp2_incoming_metadata_buffer_publish(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_metadata_batch *batch)
Definition: incoming_metadata.cc:63
void grpc_chttp2_incoming_metadata_buffer_set_deadline(grpc_chttp2_incoming_metadata_buffer *buffer, grpc_millis deadline)
Definition: incoming_metadata.cc:58
void grpc_metadata_batch_init(grpc_metadata_batch *batch)
Definition: metadata_batch.cc:85
void grpc_metadata_batch_destroy(grpc_metadata_batch *batch)
Definition: metadata_batch.cc:90
grpc_transport_stream_op_batch * batch
Definition: retry_filter.cc:208
Definition: incoming_metadata.h:26
size_t size
Definition: incoming_metadata.h:39
size_t count
Definition: incoming_metadata.h:40
~grpc_chttp2_incoming_metadata_buffer()
Definition: incoming_metadata.h:32
grpc_linked_mdelem preallocated_mdelems[kPreallocatedMDElem]
Definition: incoming_metadata.h:42
grpc_metadata_batch batch
Definition: incoming_metadata.h:43
static constexpr size_t kPreallocatedMDElem
Definition: incoming_metadata.h:36
grpc_chttp2_incoming_metadata_buffer(grpc_core::Arena *arena)
Definition: incoming_metadata.h:27
grpc_core::Arena * arena
Definition: incoming_metadata.h:38
Definition: error_internal.h:41
Definition: metadata_batch.h:36
Definition: metadata.h:98
Definition: metadata_batch.h:52
grpc_millis deadline
Used to calculate grpc-timeout at the point of sending, or GRPC_MILLIS_INF_FUTURE if this batch does ...
Definition: metadata_batch.h:59