transport.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_LIB_TRANSPORT_TRANSPORT_H
20 #define GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H
21 
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 #include <string.h>
27 
28 #include <functional>
29 #include <string>
30 
31 #include "absl/status/status.h"
32 #include "absl/strings/string_view.h"
33 #include "absl/types/optional.h"
34 
36 #include <grpc/slice.h>
37 #include <grpc/status.h>
38 #include <grpc/support/atm.h>
39 #include <grpc/support/log.h>
40 
62 
64 
65 /* Minimum and maximum protocol accepted versions. */
66 #define GRPC_PROTOCOL_VERSION_MAX_MAJOR 2
67 #define GRPC_PROTOCOL_VERSION_MAX_MINOR 1
68 #define GRPC_PROTOCOL_VERSION_MIN_MAJOR 2
69 #define GRPC_PROTOCOL_VERSION_MIN_MINOR 1
70 
71 #define GRPC_ARG_TRANSPORT "grpc.internal.transport"
72 
75 #define GRPC_WRITE_INTERNAL_COMPRESS (0x80000000u)
76 
79 #define GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED (0x40000000u)
80 
81 #define GRPC_WRITE_INTERNAL_USED_MASK \
82  (GRPC_WRITE_INTERNAL_COMPRESS | GRPC_WRITE_INTERNAL_TEST_ONLY_WAS_COMPRESSED)
83 
84 namespace grpc_core {
85 // TODO(ctiller): eliminate once MetadataHandle is constructable directly.
86 namespace promise_filter_detail {
87 class BaseCallData;
88 }
89 
90 // Small unowned "handle" type to ensure one accessor at a time to metadata.
91 // The focus here is to get promises to use the syntax we'd like - we'll
92 // probably substitute some other smart pointer later.
93 template <typename T>
95  public:
96  MetadataHandle() = default;
97 
98  MetadataHandle(const MetadataHandle&) = delete;
99  MetadataHandle& operator=(const MetadataHandle&) = delete;
100 
101  MetadataHandle(MetadataHandle&& other) noexcept : handle_(other.handle_) {
102  other.handle_ = nullptr;
103  }
105  handle_ = other.handle_;
106  other.handle_ = nullptr;
107  return *this;
108  }
109 
110  explicit MetadataHandle(const absl::Status& status) {
111  handle_ = GetContext<Arena>()->New<T>(GetContext<Arena>());
113  static_cast<grpc_status_code>(status.code()));
114  if (status.ok()) return;
117  }
118 
119  T* operator->() const { return handle_; }
120  bool has_value() const { return handle_ != nullptr; }
121  T* get() const { return handle_; }
122 
123  static MetadataHandle TestOnlyWrap(T* p) { return MetadataHandle(p); }
124 
125  private:
127 
129  T* Unwrap() {
130  T* result = handle_;
131  handle_ = nullptr;
132  return result;
133  }
134 
135  T* handle_ = nullptr;
136 };
137 
138 // Server metadata type
139 // TODO(ctiller): This should be a bespoke instance of MetadataMap<>
142 
143 // Ok/not-ok check for trailing metadata, so that it can be used as result types
144 // for TrySeq.
145 inline bool IsStatusOk(const ServerMetadataHandle& m) {
146  return m->get(GrpcStatusMetadata()).value_or(GRPC_STATUS_UNKNOWN) ==
148 }
149 
150 // Client initial metadata type
151 // TODO(ctiller): This should be a bespoke instance of MetadataMap<>
154 
155 // Server initial metadata type
156 // TODO(ctiller): This should be a bespoke instance of MetadataMap<>
158 
159 struct CallArgs {
162 };
163 
164 using NextPromiseFactory =
165  std::function<ArenaPromise<ServerMetadataHandle>(CallArgs)>;
166 
167 } // namespace grpc_core
168 
169 /* forward declarations */
170 
171 /* grpc_stream doesn't actually exist. It's used as a typesafe
172  opaque pointer for whatever data the transport wants to track
173  for a stream. */
174 typedef struct grpc_stream grpc_stream;
175 
177 
178 typedef struct grpc_stream_refcount {
181 #ifndef NDEBUG
182  const char* object_type;
183 #endif
185 
186 #ifndef NDEBUG
187 void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs,
188  grpc_iomgr_cb_func cb, void* cb_arg,
189  const char* object_type);
190 #define GRPC_STREAM_REF_INIT(rc, ir, cb, cb_arg, objtype) \
191  grpc_stream_ref_init(rc, ir, cb, cb_arg, objtype)
192 #else
193 void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs,
194  grpc_iomgr_cb_func cb, void* cb_arg);
195 #define GRPC_STREAM_REF_INIT(rc, ir, cb, cb_arg, objtype) \
196  do { \
197  grpc_stream_ref_init(rc, ir, cb, cb_arg); \
198  (void)(objtype); \
199  } while (0)
200 #endif
201 
202 #ifndef NDEBUG
204  const char* reason) {
206  gpr_log(GPR_DEBUG, "%s %p:%p REF %s", refcount->object_type, refcount,
207  refcount->destroy.cb_arg, reason);
208  }
209  refcount->refs.RefNonZero(DEBUG_LOCATION, reason);
210 }
211 #else
213  refcount->refs.RefNonZero();
214 }
215 #endif
216 
218 
219 #ifndef NDEBUG
221  const char* reason) {
223  gpr_log(GPR_DEBUG, "%s %p:%p UNREF %s", refcount->object_type, refcount,
224  refcount->destroy.cb_arg, reason);
225  }
226  if (GPR_UNLIKELY(refcount->refs.Unref(DEBUG_LOCATION, reason))) {
228  }
229 }
230 #else
232  if (GPR_UNLIKELY(refcount->refs.Unref())) {
234  }
235 }
236 #endif
237 
238 /* Wrap a buffer that is owned by some stream object into a slice that shares
239  the same refcount */
241  void* buffer, size_t length);
242 
247 };
248 
252 };
253 
256 
259 
260 // This struct (which is present in both grpc_transport_stream_op_batch
261 // and grpc_transport_op_batch) is a convenience to allow filters or
262 // transports to schedule a closure related to a particular batch without
263 // having to allocate memory. The general pattern is to initialize the
264 // closure with the callback arg set to the batch and extra_arg set to
265 // whatever state is associated with the handler (e.g., the call element
266 // or the transport stream object).
267 //
268 // Note that this can only be used by the current handler of a given
269 // batch on the way down the stack (i.e., whichever filter or transport is
270 // currently handling the batch). Once a filter or transport passes control
271 // of the batch to the next handler, it cannot depend on the contents of
272 // this struct anymore, because the next handler may reuse it.
274  void* extra_arg = nullptr;
277 };
278 
281 
282 /* Transport stream op: a set of operations to perform on a transport
283  against a single stream */
293  is_traced(false) {}
294 
305 
308 
311 
314 
316  bool send_message : 1;
317 
320 
322  bool recv_message : 1;
323 
327 
329  bool cancel_stream : 1;
330 
332  bool is_traced : 1;
333 
334  /***************************************************************************
335  * remaining fields are initialized and used at the discretion of the
336  * current handler of the op */
337 
339 };
340 
344  : context(context) {}
345  struct {
350  // If non-NULL, will be set by the transport to the peer string (a char*).
351  // The transport retains ownership of the string.
352  // Note: This pointer may be used by the transport after the
353  // send_initial_metadata op is completed. It must remain valid
354  // until the call is destroyed.
355  gpr_atm* peer_string = nullptr;
357 
358  struct {
360  // Set by the transport to true if the stream successfully wrote the
361  // trailing metadata. If this is not set but there was a send trailing
362  // metadata op present, this can indicate that a server call can be marked
363  // as a cancellation (since the stream was write-closed before status could
364  // be delivered).
365  bool* sent = nullptr;
367 
368  struct {
369  // The transport (or a filter that decides to return a failure before
370  // the op gets down to the transport) takes ownership.
371  // The batch's on_complete will not be called until after the byte
372  // stream is orphaned.
375  // Set by the transport if the stream has been closed for writes. If this
376  // is set and send message op is present, we set the operation to be a
377  // failure without sending a cancel OP down the stack. This is so that the
378  // status of the call does not get overwritten by the Cancel OP, which would
379  // be especially problematic if we had received a valid status from the
380  // server.
381  // For send_initial_metadata, it is fine for the status to be overwritten
382  // because at that point, the client will not have received a status.
383  // For send_trailing_metadata, we might overwrite the status if we have
384  // non-zero metadata to send. This is fine because the API does not allow
385  // the client to send trailing metadata.
386  bool stream_write_closed = false;
387  } send_message;
388 
389  struct {
391  // Flags are used only on the server side. If non-null, will be set to
392  // a bitfield of the GRPC_INITIAL_METADATA_xxx macros (e.g., to
393  // indicate if the call is idempotent).
394  uint32_t* recv_flags = nullptr;
397  // If not NULL, will be set to true if trailing metadata is
398  // immediately available. This may be a signal that we received a
399  // Trailers-Only response. The retry filter checks this to know whether to
400  // defer the decision to commit the call or not. The C++ callback API also
401  // uses this to set the success flag of OnReadInitialMetadataDone()
402  // callback.
404  // If non-NULL, will be set by the transport to the peer string (a char*).
405  // The transport retains ownership of the string.
406  // Note: This pointer may be used by the transport after the
407  // recv_initial_metadata op is completed. It must remain valid
408  // until the call is destroyed.
409  gpr_atm* peer_string = nullptr;
411 
412  struct {
413  // Will be set by the transport to point to the byte stream containing a
414  // received message. Will be nullopt if trailing metadata is received
415  // instead of a message.
417  uint32_t* flags = nullptr;
418  // Was this recv_message failed for reasons other than a clean end-of-stream
422  } recv_message;
423 
424  struct {
430 
441  struct {
442  // Error contract: the transport that gets this op must cause cancel_error
443  // to be unref'ed after processing it
445  } cancel_stream;
446 
447  /* Indexes correspond to grpc_context_index enum values */
449 };
450 
452 typedef struct grpc_transport_op {
460  nullptr;
473  bool set_accept_stream = false;
474  void (*set_accept_stream_fn)(void* user_data, grpc_transport* transport,
475  const void* server_data) = nullptr;
481  bool set_make_promise = false;
482  void (*set_make_promise_fn)(void* user_data, grpc_transport* transport,
483  const void* server_data) = nullptr;
484  void* set_make_promise_user_data = nullptr;
490  struct {
495  grpc_closure* on_ack = nullptr;
496  } send_ping;
497  // If true, will reset the channel's connection backoff.
498  bool reset_connect_backoff = false;
499 
500  /***************************************************************************
501  * remaining fields are initialized and used at the discretion of the
502  * transport implementation */
503 
506 
507 /* Returns the amount of memory required to store a grpc_stream for this
508  transport */
510 
511 /* Initialize transport data for a stream.
512 
513  Returns 0 on success, any other (transport-defined) value for failure.
514  May assume that stream contains all-zeros.
515 
516  Arguments:
517  transport - the transport on which to create this stream
518  stream - a pointer to uninitialized memory to initialize
519  server_data - either NULL for a client initiated stream, or a pointer
520  supplied from the accept_stream callback function */
523  const void* server_data,
525 
527  grpc_polling_entity* pollent);
528 
529 /* Destroy transport data for a stream.
530 
531  Requires: a recv_batch with final_state == GRPC_STREAM_CLOSED has been
532  received by the up-layer. Must not be called in the same call stack as
533  recv_frame.
534 
535  Arguments:
536  transport - the transport on which to create this stream
537  stream - the grpc_stream to destroy (memory is still owned by the
538  caller, but any child memory must be cleaned up) */
541  grpc_closure* then_schedule_closure);
542 
545  grpc_core::CallCombiner* call_combiner);
549 
553 
554 /* Send a batch of operations on a transport
555 
556  Takes ownership of any objects contained in ops.
557 
558  Arguments:
559  transport - the transport on which to initiate the stream
560  stream - the stream on which to send the operations. This must be
561  non-NULL and previously initialized by the same transport.
562  op - a grpc_transport_stream_op_batch specifying the op to perform
563  */
567 
570 
571 /* Send a ping on a transport
572 
573  Calls cb with user data when a response is received. */
575 
576 /* Advise peer of pending connection termination. */
578  grpc_slice debug_data);
579 
580 /* Destroy the transport */
582 
583 /* Get the endpoint used by \a transport */
585 
586 /* Allocate a grpc_transport_op, and preconfigure the on_complete closure to
587  \a on_complete and then delete the returned transport op */
589 /* Allocate a grpc_transport_stream_op_batch, and preconfigure the on_complete
590  closure
591  to \a on_complete and then delete the returned transport op */
593  grpc_closure* on_complete);
594 
595 namespace grpc_core {
596 // This is the key to be used for loading/storing keepalive_throttling in the
597 // absl::Status object.
598 constexpr const char* kKeepaliveThrottlingKey =
599  "grpc.internal.keepalive_throttling";
600 } // namespace grpc_core
601 
602 #endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H */
grpc_transport_stream_op_batch_payload::stream_write_closed
bool stream_write_closed
Definition: transport.h:386
grpc_core::CallCombinerClosureList
Definition: call_combiner.h:144
trace.h
grpc_core::CallArgs::client_initial_metadata
ClientMetadataHandle client_initial_metadata
Definition: transport.h:160
slice.h
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
grpc_core::CallCombiner
Definition: call_combiner.h:50
grpc_stream_refcount::object_type
const char * object_type
Definition: transport.h:182
grpc_trace_stream_refcount
grpc_core::DebugOnlyTraceFlag grpc_trace_stream_refcount
grpc_transport_op::handler_private
grpc_handler_private_op_data handler_private
Definition: transport.h:504
grpc_transport_op::set_make_promise_fn
void(* set_make_promise_fn)(void *user_data, grpc_transport *transport, const void *server_data)
Definition: transport.h:482
pollset.h
orphanable.h
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
log.h
grpc_core::ConnectivityStateWatcherInterface
Definition: src/core/lib/transport/connectivity_state.h:49
metadata_batch.h
grpc_transport_perform_stream_op
void grpc_transport_perform_stream_op(grpc_transport *transport, grpc_stream *stream, grpc_transport_stream_op_batch *op)
Definition: transport.cc:108
grpc_transport_stream_op_batch_payload::grpc_transport_stream_op_batch_payload
grpc_transport_stream_op_batch_payload(grpc_call_context_element *context)
Definition: transport.h:342
memset
return memset(p, 0, total)
grpc_core::MetadataHandle::MetadataHandle
MetadataHandle(MetadataHandle &&other) noexcept
Definition: transport.h:101
connectivity_state.h
grpc_transport_op::bind_pollset_set
grpc_pollset_set * bind_pollset_set
Definition: transport.h:488
grpc_stream_refcount
struct grpc_stream_refcount grpc_stream_refcount
polling_entity.h
grpc_transport_stream_op_batch::recv_message
bool recv_message
Definition: transport.h:322
grpc_transport_stream_op_batch_finish_with_failure
void grpc_transport_stream_op_batch_finish_with_failure(grpc_transport_stream_op_batch *batch, grpc_error_handle error, grpc_core::CallCombiner *call_combiner)
Definition: transport.cc:151
grpc_handler_private_op_data::closure
grpc_closure closure
Definition: transport.h:275
slice.h
grpc_transport_op::set_make_promise
bool set_make_promise
Definition: transport.h:481
false
#define false
Definition: setup_once.h:323
grpc_transport_goaway
void grpc_transport_goaway(grpc_transport *transport, grpc_status_code status, grpc_slice debug_data)
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::kKeepaliveThrottlingKey
constexpr const char * kKeepaliveThrottlingKey
Definition: transport.h:598
grpc_transport_ping
void grpc_transport_ping(grpc_transport *transport, grpc_closure *cb)
grpc_transport_stream_op_batch::on_complete
grpc_closure * on_complete
Definition: transport.h:304
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition: iomgr_fwd.h:23
string.h
grpc_transport_destroy
void grpc_transport_destroy(grpc_transport *transport)
Definition: transport.cc:96
latch.h
grpc_transport_stream_op_batch_payload::sent
bool * sent
Definition: transport.h:365
grpc_transport_stream_stats::outgoing
grpc_transport_one_way_stats outgoing
Definition: transport.h:251
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc_core::GrpcMessageMetadata
Definition: metadata_batch.h:220
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_core::MetadataHandle::operator=
MetadataHandle & operator=(const MetadataHandle &)=delete
grpc_core::IsStatusOk
bool IsStatusOk(const absl::Status &status)
Definition: src/core/lib/promise/detail/status.h:46
grpc_status_code
grpc_status_code
Definition: include/grpc/impl/codegen/status.h:28
grpc_transport_op::set_accept_stream_user_data
void * set_accept_stream_user_data
Definition: transport.h:476
arena.h
grpc_stream_refcount::destroy
grpc_closure destroy
Definition: transport.h:180
closure.h
status
absl::Status status
Definition: rls.cc:251
grpc_handler_private_op_data::extra_arg
void * extra_arg
Definition: transport.h:274
grpc_core::MetadataHandle::operator=
MetadataHandle & operator=(MetadataHandle &&other) noexcept
Definition: transport.h:104
grpc_transport_stream_op_batch_payload::send_initial_metadata
grpc_metadata_batch * send_initial_metadata
Definition: transport.h:346
grpc_transport_op::disconnect_with_error
grpc_error_handle disconnect_with_error
Definition: transport.h:464
grpc_transport_stream_op_batch_payload::collect_stats
grpc_transport_stream_stats * collect_stats
Definition: transport.h:426
to
size_t to
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1385
grpc_stream_destroy
void grpc_stream_destroy(grpc_stream_refcount *refcount)
Definition: transport.cc:36
grpc_handler_private_op_data::grpc_handler_private_op_data
grpc_handler_private_op_data()
Definition: transport.h:276
grpc_core::Arena
Definition: src/core/lib/resource_quota/arena.h:45
grpc_core::MetadataHandle::Unwrap
T * Unwrap()
Definition: transport.h:129
T
#define T(upbtypeconst, upbtype, ctype, default_value)
grpc_transport_op::set_make_promise_user_data
void * set_make_promise_user_data
Definition: transport.h:484
grpc_transport_op::goaway_error
grpc_error_handle goaway_error
Definition: transport.h:468
grpc_core::CallArgs::server_initial_metadata
Latch< ServerMetadata * > * server_initial_metadata
Definition: transport.h:161
grpc_transport_op
Definition: transport.h:452
arena
grpc_core::ScopedArenaPtr arena
Definition: binder_transport_test.cc:237
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
grpc_stream_ref_init
void grpc_stream_ref_init(grpc_stream_refcount *refcount, int initial_refs, grpc_iomgr_cb_func cb, void *cb_arg, const char *object_type)
Definition: transport.cc:59
status.h
grpc_transport_op::start_connectivity_watch
grpc_core::OrphanablePtr< grpc_core::ConnectivityStateWatcherInterface > start_connectivity_watch
Definition: transport.h:457
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
from
size_t from
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1384
grpc_transport_stream_op_batch_payload::recv_initial_metadata_ready
grpc_closure * recv_initial_metadata_ready
Definition: transport.h:396
grpc_transport_perform_op
void grpc_transport_perform_op(grpc_transport *transport, grpc_transport_op *op)
Definition: transport.cc:114
DEBUG_LOCATION
#define DEBUG_LOCATION
Definition: debug_location.h:41
refcount
size_t refcount
Definition: abseil-cpp/absl/strings/internal/cordz_info.cc:122
context.h
grpc_transport_stream_op_batch::cancel_stream
bool cancel_stream
Definition: transport.h:329
grpc_transport_op::on_initiate
grpc_closure * on_initiate
Definition: transport.h:493
grpc_core::slice_detail::CopyConstructors< Slice >::FromCopiedString
static Slice FromCopiedString(const char *s)
Definition: src/core/lib/slice/slice.h:173
grpc_transport_stream_size
size_t grpc_transport_stream_size(grpc_transport *transport)
Definition: transport.cc:92
grpc_transport_stream_op_batch::handler_private
grpc_handler_private_op_data handler_private
Definition: transport.h:338
grpc_transport_stream_op_batch_queue_finish_with_failure
void grpc_transport_stream_op_batch_queue_finish_with_failure(grpc_transport_stream_op_batch *batch, grpc_error_handle error, grpc_core::CallCombinerClosureList *closures)
Definition: transport.cc:161
grpc_core::NextPromiseFactory
std::function< ArenaPromise< ServerMetadataHandle >(CallArgs)> NextPromiseFactory
Definition: transport.h:165
GRPC_STATUS_OK
@ GRPC_STATUS_OK
Definition: include/grpc/impl/codegen/status.h:30
grpc_transport_stream_op_batch_payload::recv_message_ready
grpc_closure * recv_message_ready
Definition: transport.h:421
grpc_transport_set_pops
void grpc_transport_set_pops(grpc_transport *transport, grpc_stream *stream, grpc_polling_entity *pollent)
Definition: transport.cc:119
grpc_transport_op::set_accept_stream
bool set_accept_stream
Definition: transport.h:473
send_message
Definition: send_message.py:1
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
transport
grpc_transport transport
Definition: filter_fuzzer.cc:146
GPR_UNLIKELY
#define GPR_UNLIKELY(x)
Definition: impl/codegen/port_platform.h:770
grpc_transport_one_way_stats::framing_bytes
uint64_t framing_bytes
Definition: transport.h:244
grpc_transport_stream_op_batch_payload::send_initial_metadata_flags
uint32_t send_initial_metadata_flags
Definition: transport.h:349
connectivity_state.h
absl::Status::message
absl::string_view message() const
Definition: third_party/abseil-cpp/absl/status/status.h:806
grpc_transport_stream_op_batch_payload::cancel_error
grpc_error_handle cancel_error
Definition: transport.h:444
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
call_combiner.h
grpc_transport_op::reset_connect_backoff
bool reset_connect_backoff
Definition: transport.h:498
absl::optional< grpc_core::SliceBuffer >
GRPC_CHANNEL_IDLE
@ GRPC_CHANNEL_IDLE
Definition: include/grpc/impl/codegen/connectivity_state.h:32
grpc_transport_stream_op_batch::is_traced
bool is_traced
Definition: transport.h:332
grpc_transport_op::send_ping
struct grpc_transport_op::@47 send_ping
grpc_transport_stream_op_batch::payload
grpc_transport_stream_op_batch_payload * payload
Definition: transport.h:307
grpc_transport_stream_op_batch_payload::send_trailing_metadata
grpc_metadata_batch * send_trailing_metadata
Definition: transport.h:359
arena_promise.h
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
grpc_stream_ref
void grpc_stream_ref(grpc_stream_refcount *refcount, const char *reason)
Definition: transport.h:203
grpc_transport_one_way_stats::data_bytes
uint64_t data_bytes
Definition: transport.h:245
grpc_core::CallArgs
Definition: transport.h:159
error.h
grpc_transport_op::start_connectivity_watch_state
grpc_connectivity_state start_connectivity_watch_state
Definition: transport.h:458
grpc_polling_entity
Definition: polling_entity.h:38
batch
grpc_transport_stream_op_batch * batch
Definition: retry_filter.cc:243
buffer
char buffer[1024]
Definition: libuv/docs/code/idle-compute/main.c:8
grpc_core::MetadataHandle::get
T * get() const
Definition: transport.h:121
grpc_transport_op::stop_connectivity_watch
grpc_core::ConnectivityStateWatcherInterface * stop_connectivity_watch
Definition: transport.h:459
grpc_transport_one_way_stats
Definition: transport.h:243
grpc_core::GrpcStatusMetadata
Definition: metadata_batch.h:293
grpc_transport_one_way_stats::header_bytes
uint64_t header_bytes
Definition: transport.h:246
stdint.h
transport_fwd.h
grpc_core::MetadataHandle
Definition: transport.h:94
grpc_core::TraceFlag
Definition: debug/trace.h:63
grpc_transport_stream_stats::incoming
grpc_transport_one_way_stats incoming
Definition: transport.h:250
grpc_transport_destroy_stream
void grpc_transport_destroy_stream(grpc_transport *transport, grpc_stream *stream, grpc_closure *then_schedule_closure)
Definition: transport.cc:134
grpc_core::TraceFlag::enabled
bool enabled()
Definition: debug/trace.h:82
grpc_make_transport_op
grpc_transport_op * grpc_make_transport_op(grpc_closure *on_complete)
Definition: transport.cc:205
grpc_transport_stream_op_batch::recv_initial_metadata
bool recv_initial_metadata
Definition: transport.h:319
grpc_transport_stream_op_batch_string
std::string grpc_transport_stream_op_batch_string(grpc_transport_stream_op_batch *op)
Definition: transport_op_string.cc:44
gpr_atm
intptr_t gpr_atm
Definition: impl/codegen/atm_gcc_atomic.h:32
grpc_transport_stream_op_batch_payload
Definition: transport.h:341
grpc_transport_stream_op_batch::send_trailing_metadata
bool send_trailing_metadata
Definition: transport.h:313
grpc_core::SliceBuffer
Definition: src/core/lib/slice/slice_buffer.h:44
debug_location.h
grpc_make_transport_stream_op
grpc_transport_stream_op_batch * grpc_make_transport_stream_op(grpc_closure *on_complete)
Definition: transport.cc:230
grpc_core::MetadataHandle::MetadataHandle
MetadataHandle()=default
grpc_transport_stream_op_batch::send_message
bool send_message
Definition: transport.h:316
grpc_transport_stream_op_batch_payload::recv_flags
uint32_t * recv_flags
Definition: transport.h:394
absl::flags_internal
Definition: abseil-cpp/absl/flags/commandlineflag.h:40
grpc_transport_stream_op_batch_payload::trailing_metadata_available
bool * trailing_metadata_available
Definition: transport.h:403
grpc_core::MetadataHandle::handle_
T * handle_
Definition: transport.h:135
ref_counted.h
grpc_transport_stream_stats
Definition: transport.h:249
grpc_transport_stream_op_batch_payload::peer_string
gpr_atm * peer_string
Definition: transport.h:355
grpc_slice_from_stream_owned_buffer
grpc_slice grpc_slice_from_stream_owned_buffer(grpc_stream_refcount *refcount, void *buffer, size_t length)
absl::Status
Definition: third_party/abseil-cpp/absl/status/status.h:424
grpc_transport_op
struct grpc_transport_op grpc_transport_op
grpc_core::promise_filter_detail::BaseCallData
Definition: promise_based_filter.h:130
grpc_transport_op_string
std::string grpc_transport_op_string(grpc_transport_op *op)
Definition: transport_op_string.cc:95
grpc_transport_stream_op_batch_payload::call_failed_before_recv_message
bool * call_failed_before_recv_message
Definition: transport.h:419
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:64
grpc_iomgr_cb_func
void(* grpc_iomgr_cb_func)(void *arg, grpc_error_handle error)
Definition: closure.h:53
grpc_transport_stream_op_batch_payload::send_message
grpc_core::SliceBuffer * send_message
Definition: transport.h:373
grpc_call_context_element
Definition: core/lib/channel/context.h:51
grpc_transport_stream_op_batch_payload::recv_initial_metadata
grpc_metadata_batch * recv_initial_metadata
Definition: transport.h:390
grpc_core::MetadataHandle::TestOnlyWrap
static MetadataHandle TestOnlyWrap(T *p)
Definition: transport.h:123
grpc_transport_stream_op_batch::send_initial_metadata
bool send_initial_metadata
Definition: transport.h:310
grpc_transport_stream_op_batch_payload::recv_message
absl::optional< grpc_core::SliceBuffer > * recv_message
Definition: transport.h:416
grpc_transport_stream_op_batch_payload::context
grpc_call_context_element * context
Definition: transport.h:448
grpc_transport_op::set_accept_stream_fn
void(* set_accept_stream_fn)(void *user_data, grpc_transport *transport, const void *server_data)
Definition: transport.h:474
closure
Definition: proxy.cc:59
absl::Status::ok
ABSL_MUST_USE_RESULT bool ok() const
Definition: third_party/abseil-cpp/absl/status/status.h:802
grpc_handler_private_op_data
Definition: transport.h:273
grpc_transport
Definition: transport_impl.h:89
grpc_transport_get_endpoint
grpc_endpoint * grpc_transport_get_endpoint(grpc_transport *transport)
Definition: transport.cc:140
grpc_transport_op::on_consumed
grpc_closure * on_consumed
Definition: transport.h:454
grpc_transport_stream_op_batch::grpc_transport_stream_op_batch
grpc_transport_stream_op_batch()
Definition: transport.h:285
grpc_stream
struct grpc_stream grpc_stream
Definition: transport.h:174
grpc_stream_refcount::refs
grpc_core::RefCount refs
Definition: transport.h:179
grpc_core::MetadataHandle::has_value
bool has_value() const
Definition: transport.h:120
context.h
grpc_transport_stream_op_batch::recv_trailing_metadata
bool recv_trailing_metadata
Definition: transport.h:326
handle
static csh handle
Definition: test_arm_regression.c:16
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
grpc_core::MetadataHandle::MetadataHandle
MetadataHandle(T *handle)
Definition: transport.h:128
grpc_core::MetadataHandle::MetadataHandle
MetadataHandle(const absl::Status &status)
Definition: transport.h:110
atm.h
grpc_transport_stream_op_batch_payload::recv_trailing_metadata
grpc_metadata_batch * recv_trailing_metadata
Definition: transport.h:425
iomgr_fwd.h
endpoint.h
grpc_error
Definition: error_internal.h:42
length
std::size_t length
Definition: abseil-cpp/absl/time/internal/test_util.cc:57
regress.m
m
Definition: regress/regress.py:25
absl::Status::code
absl::StatusCode code() const
Definition: third_party/abseil-cpp/absl/status/status.cc:233
grpc_metadata_batch
Definition: metadata_batch.h:1259
grpc_pollset
Definition: bm_cq_multiple_threads.cc:37
grpc_transport_stream_op_batch
Definition: transport.h:284
grpc_core::RefCount
Definition: ref_counted.h:44
grpc_transport_init_stream
int grpc_transport_init_stream(grpc_transport *transport, grpc_stream *stream, grpc_stream_refcount *refcount, const void *server_data, grpc_core::Arena *arena)
Definition: transport.cc:100
grpc_closure
Definition: closure.h:56
grpc_core::MetadataHandle::operator->
T * operator->() const
Definition: transport.h:119
op
static grpc_op * op
Definition: test/core/fling/client.cc:47
grpc_transport_move_stats
void grpc_transport_move_stats(grpc_transport_stream_stats *from, grpc_transport_stream_stats *to)
Definition: transport.cc:86
slice_buffer.h
grpc_stream_unref
void grpc_stream_unref(grpc_stream_refcount *refcount, const char *reason)
Definition: transport.h:220
grpc_endpoint
Definition: endpoint.h:105
grpc_core::Latch
Definition: latch.h:32
grpc_transport_move_one_way_stats
void grpc_transport_move_one_way_stats(grpc_transport_one_way_stats *from, grpc_transport_one_way_stats *to)
Definition: transport.cc:79
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351
grpc_stream_refcount
Definition: transport.h:178
grpc_transport_op::bind_pollset
grpc_pollset * bind_pollset
Definition: transport.h:486
GRPC_STATUS_UNKNOWN
@ GRPC_STATUS_UNKNOWN
Definition: include/grpc/impl/codegen/status.h:40
grpc_transport_op::on_ack
grpc_closure * on_ack
Definition: transport.h:495
grpc_transport_stream_op_batch_payload::cancel_stream
struct grpc_transport_stream_op_batch_payload::@46 cancel_stream
grpc_transport_stream_op_batch_payload::recv_trailing_metadata_ready
grpc_closure * recv_trailing_metadata_ready
Definition: transport.h:428
port_platform.h
stream
voidpf stream
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:40