GRPC Core  9.0.0
internal.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_INTERNAL_H
20 #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H
21 
23 
24 #include <assert.h>
25 #include <stdbool.h>
26 
47 
48 namespace grpc_core {
49 class ContextList;
50 }
51 
52 /* streams are kept in various linked lists depending on what things need to
53  happen to them... this enum labels each list */
54 typedef enum {
62  STREAM_LIST_COUNT /* must be last */
64 
65 typedef enum {
70 
71 typedef enum {
75 
76 typedef enum {
80  GRPC_CHTTP2_PCL_COUNT /* must be last */
82 
83 typedef enum {
105 
108 
109 typedef struct {
111  uint64_t inflight_id = 0;
113 
114 typedef struct {
120 
121 typedef struct {
127 
128 typedef struct {
132 
133 /* deframer state for the overall http2 stream of bytes */
134 typedef enum {
135  /* prefix: one entry per http2 connection prefix byte */
160  /* frame header byte 0... */
161  /* must follow from the prefix states */
170  /* ... frame header byte 8 */
172  /* inside a http2 frame */
175 
176 typedef struct {
180 
181 typedef struct {
185 
186 /* We keep several sets of connection wide parameters */
187 typedef enum {
188  /* The settings our peer has asked for (and we have acked) */
190  /* The settings we'd like to have */
192  /* The settings we've published to our peer */
194  /* The settings the peer has acked */
198 
199 typedef enum {
204 
205 typedef struct grpc_chttp2_write_cb {
206  int64_t call_at_byte;
210 
211 namespace grpc_core {
212 
214  public:
216  grpc_chttp2_stream* stream, uint32_t frame_size,
217  uint32_t flags);
218 
219  void Orphan() override;
220 
221  bool Next(size_t max_size_hint, grpc_closure* on_complete) override;
222  grpc_error* Pull(grpc_slice* slice) override;
223  void Shutdown(grpc_error* error) override;
224 
225  // TODO(roth): When I converted this class to C++, I wanted to make it
226  // inherit from RefCounted or InternallyRefCounted instead of continuing
227  // to use its own custom ref-counting code. However, that would require
228  // using multiple inheritance, which sucks in general. And to make matters
229  // worse, it causes problems with our New<> and Delete<> wrappers.
230  // Specifically, unless RefCounted is first in the list of parent classes,
231  // it will see a different value of the address of the object than the one
232  // we actually allocated, in which case gpr_free() will be called on a
233  // different address than the one we got from gpr_malloc(), thus causing a
234  // crash. Given the fragility of depending on that, as well as a desire to
235  // avoid multiple inheritance in general, I've decided to leave this
236  // alone for now. We can revisit this once we're able to link against
237  // libc++, at which point we can eliminate New<> and Delete<> and
238  // switch to std::shared_ptr<>.
239  void Ref() { refs_.Ref(); }
240  void Unref() {
241  if (GPR_UNLIKELY(refs_.Unref())) {
242  delete this;
243  }
244  }
245 
246  void PublishError(grpc_error* error);
247 
248  grpc_error* Push(const grpc_slice& slice, grpc_slice* slice_out);
249 
250  grpc_error* Finished(grpc_error* error, bool reset_on_error);
251 
252  uint32_t remaining_bytes() const { return remaining_bytes_; }
253 
254  private:
255  static void NextLocked(void* arg, grpc_error* error_ignored);
256  static void OrphanLocked(void* arg, grpc_error* error_ignored);
257 
258  void MaybeCreateStreamDecompressionCtx();
259 
260  grpc_chttp2_transport* transport_; // Immutable.
261  grpc_chttp2_stream* stream_; // Immutable.
262 
263  grpc_core::RefCount refs_;
264 
265  /* Accessed only by transport thread when stream->pending_byte_stream == false
266  * Accessed only by application thread when stream->pending_byte_stream ==
267  * true */
268  uint32_t remaining_bytes_;
269 
270  /* Accessed only by transport thread when stream->pending_byte_stream == false
271  * Accessed only by application thread when stream->pending_byte_stream ==
272  * true */
273  struct {
277  } next_action_;
278  grpc_closure destroy_action_;
279 };
280 
281 } // namespace grpc_core
282 
283 typedef enum {
289 
291  grpc_chttp2_transport(const grpc_channel_args* channel_args,
292  grpc_endpoint* ep, bool is_client,
295 
296  grpc_transport base; /* must be first */
299  char* peer_string;
300 
302 
304 
306 
309 
311  uint8_t destroying = false;
314 
316  uint8_t endpoint_reading = 1;
317 
320 
323 
327 
329 
332 
337 
338  /* accept stream callback */
339  void (*accept_stream_cb)(void* user_data, grpc_transport* transport,
340  const void* server_data);
342 
345 
351  bool is_client;
352 
355 
358  uint32_t write_buffer_size = grpc_core::chttp2::kDefaultWindow;
359 
363 
365 
369  bool sent_local_settings = false;
376 
379  uint32_t next_stream_id = 0;
380 
382  uint32_t last_new_stream_id = 0;
383 
388  uint64_t ping_ctr = 0; /* unique id for pings */
390 
392  size_t ping_ack_count = 0;
393  size_t ping_ack_capacity = 0;
394  uint64_t* ping_acks = nullptr;
396 
400  union {
408 
418 
419  /* deframing */
421  uint8_t incoming_frame_type = 0;
422  uint8_t incoming_frame_flags = 0;
423  uint8_t header_eof = 0;
424  bool is_first_frame = true;
426  uint32_t incoming_frame_size = 0;
427  uint32_t incoming_stream_id = 0;
428 
429  /* active parser */
430  void* parser_data = nullptr;
432  grpc_error* (*parser)(void* parser_user_data, grpc_chttp2_transport* t,
433  grpc_chttp2_stream* s, const grpc_slice& slice,
434  int is_last);
435 
437 
438  /* bdp estimator */
442 
443  /* if non-NULL, close the transport with this error when writes are finished
444  */
446 
447  /* a list of closures to run after writes are finished */
449 
450  /* buffer pool state */
459 
460  /* next bdp ping timer */
463  bool bdp_ping_started = false;
465 
466  /* keep-alive ping support */
499 };
500 
501 typedef enum {
507 
510  const void* server_data, grpc_core::Arena* arena);
512 
513  void* context;
516  // Reffer is a 0-len structure, simply reffing `t` and `refcount` in its ctor
517  // before initializing the rest of the stream, to avoid cache misses. This
518  // field MUST be right after `t` and `refcount`.
519  struct Reffer {
520  explicit Reffer(grpc_chttp2_stream* s);
522 
525 
528 
530  uint32_t id = 0;
531 
537 
546 
554 
557 
559  bool write_closed = false;
561  bool read_closed = false;
566  bool seen_error = false;
569  bool write_buffering = false;
570 
571  /* have we sent or received the EOS bit? */
572  bool eos_received = false;
573  bool eos_sent = false;
574 
579 
582 
584 
585  grpc_slice_buffer frame_storage; /* protected by t combiner */
586 
587  grpc_closure* on_next = nullptr; /* protected by t combiner */
588  bool pending_byte_stream = false; /* protected by t combiner */
589  // cached length of buffer to be used by the transport thread in cases where
590  // stream->pending_byte_stream == true. The value is saved before
591  // application threads are allowed to modify
592  // unprocessed_incoming_frames_buffer
594  /* Accessed only by transport thread when stream->pending_byte_stream == false
595  * Accessed only by application thread when stream->pending_byte_stream ==
596  * true */
599  grpc_error* byte_stream_error = GRPC_ERROR_NONE; /* protected by t combiner */
600  bool received_last_frame = false; /* protected by t combiner */
601 
603 
609  /* Accessed only by transport thread when stream->pending_byte_stream == false
610  * Accessed only by application thread when stream->pending_byte_stream ==
611  * true */
614  int64_t received_bytes = 0;
615 
616  bool sent_initial_metadata = false;
618 
624 
626 
630  size_t sending_bytes = 0;
631 
632  /* Stream compression method to be used. */
635  /* Stream decompression method to be used. */
638 
643  bool traced = false;
647  size_t byte_counter = 0;
648 
656 
664 };
665 
680 
681 typedef struct {
683  bool writing;
685  bool partial;
689 
693 
697  const grpc_slice& slice);
698 
700  grpc_chttp2_stream* s);
704  grpc_chttp2_stream** s);
706  grpc_chttp2_stream* s);
707 
709  grpc_chttp2_stream* s);
712  grpc_chttp2_stream** s);
713 
715  grpc_chttp2_stream* s);
717  grpc_chttp2_stream** s);
718 
720  grpc_chttp2_stream* s);
722  grpc_chttp2_stream** s);
724  grpc_chttp2_stream* s);
725 
727  grpc_chttp2_stream* s);
729  grpc_chttp2_stream** s);
731  grpc_chttp2_stream* s);
732 
734  grpc_chttp2_stream* s);
736  grpc_chttp2_stream** s);
738  grpc_chttp2_stream* s);
739 
740 /********* Flow Control ***************/
741 
742 // Takes in a flow control action and performs all the needed operations.
746 
747 /********* End of Flow Control ***************/
748 
750  grpc_chttp2_transport* t, uint32_t id) {
751  return static_cast<grpc_chttp2_stream*>(
753 }
755  uint32_t id);
756 
758  uint32_t goaway_error,
759  uint32_t last_stream_id,
760  const grpc_slice& goaway_text);
761 
763 
766  grpc_closure** pclosure,
767  grpc_error* error, const char* desc);
768 
769 #define GRPC_HEADER_SIZE_IN_BYTES 5
770 #define MAX_SIZE_T (~(size_t)0)
771 
772 #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
773 #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \
774  (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1)
775 
776 // extern grpc_core::TraceFlag grpc_http_trace;
777 // extern grpc_core::TraceFlag grpc_flowctl_trace;
778 
779 #define GRPC_CHTTP2_IF_TRACING(stmt) \
780  do { \
781  if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) { \
782  (stmt); \
783  } \
784  } while (0)
785 
787  grpc_chttp2_stream* stream, grpc_error* error);
789  grpc_chttp2_stream* s, int close_reads,
790  int close_writes, grpc_error* error);
792 
793 #ifndef NDEBUG
794 #define GRPC_CHTTP2_STREAM_REF(stream, reason) \
795  grpc_chttp2_stream_ref(stream, reason)
796 #define GRPC_CHTTP2_STREAM_UNREF(stream, reason) \
797  grpc_chttp2_stream_unref(stream, reason)
798 void grpc_chttp2_stream_ref(grpc_chttp2_stream* s, const char* reason);
799 void grpc_chttp2_stream_unref(grpc_chttp2_stream* s, const char* reason);
800 #else
801 #define GRPC_CHTTP2_STREAM_REF(stream, reason) grpc_chttp2_stream_ref(stream)
802 #define GRPC_CHTTP2_STREAM_UNREF(stream, reason) \
803  grpc_chttp2_stream_unref(stream)
806 #endif
807 
808 #ifndef NDEBUG
809 #define GRPC_CHTTP2_REF_TRANSPORT(t, r) \
810  grpc_chttp2_ref_transport(t, r, __FILE__, __LINE__)
811 #define GRPC_CHTTP2_UNREF_TRANSPORT(t, r) \
812  grpc_chttp2_unref_transport(t, r, __FILE__, __LINE__)
814  const char* reason, const char* file,
815  int line) {
816  if (t->refs.Unref(grpc_core::DebugLocation(file, line), reason)) {
817  delete t;
818  }
819 }
821  const char* reason, const char* file,
822  int line) {
823  t->refs.Ref(grpc_core::DebugLocation(file, line), reason);
824 }
825 #else
826 #define GRPC_CHTTP2_REF_TRANSPORT(t, r) grpc_chttp2_ref_transport(t)
827 #define GRPC_CHTTP2_UNREF_TRANSPORT(t, r) grpc_chttp2_unref_transport(t)
829  if (t->refs.Unref()) {
830  delete t;
831  }
832 }
834  t->refs.Ref();
835 }
836 #endif
837 
838 void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id);
839 
845 
849  grpc_chttp2_stream* s);
850 
852  grpc_error* due_to_error);
853 
855  grpc_chttp2_stream* s);
857  grpc_chttp2_stream* s);
859  grpc_chttp2_stream* s);
860 
862  grpc_chttp2_stream* s, grpc_error* error);
863 
867  bool is_client);
868 
869 void grpc_chttp2_retry_initiate_ping(void* tp, grpc_error* error);
870 
871 #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */
grpc_chttp2_server_ping_recv_state
Definition: internal.h:128
grpc_core::Chttp2IncomingByteStream::Next
bool Next(size_t max_size_hint, grpc_closure *on_complete) override
Definition: chttp2_transport.cc:3029
grpc_chttp2_transport::incoming_stream_id
uint32_t incoming_stream_id
Definition: internal.h:427
grpc_core::ByteStream
Definition: byte_stream.h:36
grpc_chttp2_begin_write_result::partial
bool partial
if writing: was it a complete flush (false) or a partial flush (true)
Definition: internal.h:685
grpc_chttp2_transport::write_action_begin_locked
grpc_closure write_action_begin_locked
Definition: internal.h:324
grpc_chttp2_stream_list::head
grpc_chttp2_stream * head
Definition: internal.h:177
grpc_chttp2_setting_set
grpc_chttp2_setting_set
Definition: internal.h:187
GRPC_ACKED_SETTINGS
@ GRPC_ACKED_SETTINGS
Definition: internal.h:195
grpc_chttp2_initiate_write_reason
grpc_chttp2_initiate_write_reason
Definition: internal.h:83
grpc_chttp2_list_pop_stalled_by_transport
bool grpc_chttp2_list_pop_stalled_by_transport(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
Definition: stream_lists.cc:192
grpc_chttp2_stream::stream_decompression_method
grpc_stream_compression_method stream_decompression_method
Definition: internal.h:636
GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED
@ GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED
Definition: internal.h:201
grpc_chttp2_hpack_parser
Definition: hpack_parser.h:47
grpc_chttp2_maybe_complete_recv_trailing_metadata
void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: chttp2_transport.cc:1965
grpc_chttp2_transport::grpc_chttp2_transport
grpc_chttp2_transport(const grpc_channel_args *channel_args, grpc_endpoint *ep, bool is_client, grpc_resource_user *resource_user)
Definition: chttp2_transport.cc:440
grpc_chttp2_repeated_ping_policy::max_pings_without_data
int max_pings_without_data
Definition: internal.h:115
grpc_core::ConnectivityStateTracker
Definition: connectivity_state.h:89
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
The following "special" errors can be propagated without allocating memory.
Definition: error.h:125
grpc_chttp2_stream::read_closed_error
grpc_error * read_closed_error
the error that resulted in this stream being read-closed
Definition: internal.h:576
grpc_chttp2_stream::recv_trailing_metadata
grpc_metadata_batch * recv_trailing_metadata
Definition: internal.h:552
grpc_chttp2_stream::next_message_end_offset
int64_t next_message_end_offset
Definition: internal.h:541
GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE
@ GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE
Definition: internal.h:68
GRPC_CHTTP2_WRITE_STATE_IDLE
@ GRPC_CHTTP2_WRITE_STATE_IDLE
Definition: internal.h:66
grpc_chttp2_start_writing
void grpc_chttp2_start_writing(grpc_chttp2_transport *t)
grpc_chttp2_write_cb::call_at_byte
int64_t call_at_byte
Definition: internal.h:206
grpc_chttp2_transport::flow_control
grpc_core::PolymorphicManualConstructor< grpc_core::chttp2::TransportFlowControlBase, grpc_core::chttp2::TransportFlowControl, grpc_core::chttp2::TransportFlowControlDisabled > flow_control
Definition: internal.h:413
grpc_chttp2_repeated_ping_state::pings_before_data_required
int pings_before_data_required
Definition: internal.h:123
GRPC_METADATA_PUBLISHED_FROM_WIRE
@ GRPC_METADATA_PUBLISHED_FROM_WIRE
Definition: internal.h:504
grpc_chttp2_transport::ping_policy
grpc_chttp2_repeated_ping_policy ping_policy
Definition: internal.h:386
grpc_chttp2_act_on_flowctl_action
void grpc_chttp2_act_on_flowctl_action(const grpc_core::chttp2::FlowControlAction &action, grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: chttp2_transport.cc:2448
grpc_chttp2_repeated_ping_state
Definition: internal.h:121
grpc_chttp2_list_pop_waiting_for_concurrency
bool grpc_chttp2_list_pop_waiting_for_concurrency(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
Definition: stream_lists.cc:176
connectivity_state.h
GRPC_DTS_CLIENT_PREFIX_22
@ GRPC_DTS_CLIENT_PREFIX_22
Definition: internal.h:158
grpc_chttp2_transport::expect_continuation_stream_id
uint32_t expect_continuation_stream_id
Definition: internal.h:425
grpc_stream_compression_context
Definition: stream_compression.h:34
grpc_chttp2_transport::lists
grpc_chttp2_stream_list lists[STREAM_LIST_COUNT]
various lists of streams
Definition: internal.h:319
grpc_core::RefCount::Ref
void Ref(Value n=1)
Definition: ref_counted.h:88
GRPC_DTS_FH_0
@ GRPC_DTS_FH_0
Definition: internal.h:162
grpc_chttp2_stream::flow_controlled_bytes_written
int64_t flow_controlled_bytes_written
Definition: internal.h:542
grpc_chttp2_optimization_target
grpc_chttp2_optimization_target
Definition: internal.h:71
GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL_UNSTALLED
@ GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL_UNSTALLED
Definition: internal.h:101
grpc_chttp2_transport::destroying
uint8_t destroying
is the transport destroying itself?
Definition: internal.h:311
grpc_core::RefCount::Unref
bool Unref()
Definition: ref_counted.h:174
grpc_core::DebugLocation
Definition: debug_location.h:31
grpc_core::Combiner
Definition: combiner.h:33
grpc_chttp2_list_have_writing_streams
bool grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport *t)
Definition: stream_lists.cc:162
GRPC_DTS_CLIENT_PREFIX_21
@ GRPC_DTS_CLIENT_PREFIX_21
Definition: internal.h:157
grpc_chttp2_transport::start_bdp_ping_locked
grpc_closure start_bdp_ping_locked
Definition: internal.h:440
grpc_chttp2_stream::byte_counter
size_t byte_counter
Byte counter for number of bytes written.
Definition: internal.h:647
grpc_core::Chttp2IncomingByteStream::remaining_bytes
uint32_t remaining_bytes() const
Definition: internal.h:252
grpc_core
Round Robin Policy.
Definition: backend_metric.cc:24
grpc_chttp2_perform_read
grpc_error * grpc_chttp2_perform_read(grpc_chttp2_transport *t, const grpc_slice &slice)
Process one slice of incoming data; return 1 if the connection is still viable after reading,...
Definition: parsing.cc:52
GRPC_DTS_CLIENT_PREFIX_2
@ GRPC_DTS_CLIENT_PREFIX_2
Definition: internal.h:138
grpc_chttp2_stream::write_closed_error
grpc_error * write_closed_error
the error that resulted in this stream being write-closed
Definition: internal.h:578
grpc_chttp2_stream::t
grpc_chttp2_transport * t
Definition: internal.h:514
GRPC_CLOSURE_LIST_INIT
#define GRPC_CLOSURE_LIST_INIT
Definition: closure.h:168
grpc_chttp2_maybe_complete_recv_message
void grpc_chttp2_maybe_complete_recv_message(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: chttp2_transport.cc:1880
grpc_chttp2_stream_unref
void grpc_chttp2_stream_unref(grpc_chttp2_stream *s, const char *reason)
Definition: chttp2_transport.cc:608
grpc_core::chttp2::FlowControlAction
Definition: flow_control.h:57
grpc_chttp2_transport::stream_map
grpc_chttp2_stream_map stream_map
maps stream id to grpc_chttp2_stream objects
Definition: internal.h:322
grpc_chttp2_settings_parser
Definition: frame_settings.h:37
grpc_chttp2_transport::ping_queue
grpc_chttp2_ping_queue ping_queue
ping queues for various ping insertion points
Definition: internal.h:385
GRPC_CHTTP2_INITIATE_WRITE_PING_RESPONSE
@ GRPC_CHTTP2_INITIATE_WRITE_PING_RESPONSE
Definition: internal.h:102
grpc_chttp2_stream::recv_initial_metadata_ready
grpc_closure * recv_initial_metadata_ready
Definition: internal.h:548
grpc_core::chttp2::StreamFlowControl
Definition: flow_control.h:411
grpc_chttp2_goaway_parser
Definition: frame_goaway.h:40
grpc_chttp2_write_cb::closure
grpc_closure * closure
Definition: internal.h:207
grpc_chttp2_transport::qbuf
grpc_slice_buffer qbuf
data to write next write
Definition: internal.h:354
grpc_chttp2_list_add_stalled_by_stream
void grpc_chttp2_list_add_stalled_by_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:202
grpc_chttp2_transport::write_cb_pool
grpc_chttp2_write_cb * write_cb_pool
Definition: internal.h:436
grpc_core::Chttp2IncomingByteStream
Definition: internal.h:213
grpc_core::Chttp2IncomingByteStream::Finished
grpc_error * Finished(grpc_error *error, bool reset_on_error)
Definition: chttp2_transport.cc:3128
GRPC_DTS_FH_8
@ GRPC_DTS_FH_8
Definition: internal.h:171
grpc_core::Chttp2IncomingByteStream::closure
grpc_closure closure
Definition: internal.h:274
frame_settings.h
grpc_chttp2_parsing_become_skip_parser
void grpc_chttp2_parsing_become_skip_parser(grpc_chttp2_transport *t)
Definition: parsing.cc:342
grpc_chttp2_stream::compressed_data_buffer
grpc_slice_buffer compressed_data_buffer
Buffer storing data that is compressed but not sent.
Definition: internal.h:655
GRPC_DTS_CLIENT_PREFIX_23
@ GRPC_DTS_CLIENT_PREFIX_23
Definition: internal.h:159
frame_data.h
grpc_core::Chttp2IncomingByteStream::Chttp2IncomingByteStream
Chttp2IncomingByteStream(grpc_chttp2_transport *transport, grpc_chttp2_stream *stream, uint32_t frame_size, uint32_t flags)
Definition: chttp2_transport.cc:2953
GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS
@ GRPC_CHTTP2_INITIATE_WRITE_CONTINUE_PINGS
Definition: internal.h:90
GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL
@ GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL
Definition: internal.h:94
grpc_chttp2_stream::recv_message
grpc_core::OrphanablePtr< grpc_core::ByteStream > * recv_message
Definition: internal.h:550
grpc_chttp2_fail_pending_writes
void grpc_chttp2_fail_pending_writes(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error)
Definition: chttp2_transport.cc:2174
grpc_chttp2_transport::sent_goaway_state
grpc_chttp2_sent_goaway_state sent_goaway_state
Definition: internal.h:364
grpc_chttp2_transport::write_action_end_locked
grpc_closure write_action_end_locked
Definition: internal.h:326
grpc_chttp2_stream::grpc_chttp2_stream
grpc_chttp2_stream(grpc_chttp2_transport *t, grpc_stream_refcount *refcount, const void *server_data, grpc_core::Arena *arena)
Definition: chttp2_transport.cc:628
GRPC_DTS_FH_2
@ GRPC_DTS_FH_2
Definition: internal.h:164
grpc_chttp2_stream::unprocessed_incoming_frames_buffer
grpc_slice_buffer unprocessed_incoming_frames_buffer
Definition: internal.h:597
GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE
@ GRPC_CHTTP2_INITIATE_WRITE_SEND_MESSAGE
Definition: internal.h:86
grpc_chttp2_server_ping_recv_state::ping_strikes
int ping_strikes
Definition: internal.h:130
grpc_chttp2_transport::init_keepalive_ping_locked
grpc_closure init_keepalive_ping_locked
Closure to initialize a keepalive ping.
Definition: internal.h:468
grpc_chttp2_stream::on_next
grpc_closure * on_next
Definition: internal.h:587
GRPC_CHTTP2_GOAWAY_SENT
@ GRPC_CHTTP2_GOAWAY_SENT
Definition: internal.h:202
grpc_chttp2_end_write
void grpc_chttp2_end_write(grpc_chttp2_transport *t, grpc_error *error)
Definition: writing.cc:679
grpc_timer
Definition: timer.h:30
channelz.h
grpc_chttp2_window_update_parser
Definition: frame_window_update.h:28
grpc_chttp2_transport::peer_string
char * peer_string
Definition: internal.h:299
grpc_chttp2_keepalive_state
grpc_chttp2_keepalive_state
Definition: internal.h:283
grpc_chttp2_transport::incoming_frame_flags
uint8_t incoming_frame_flags
Definition: internal.h:422
grpc_chttp2_transport::destructive_reclaimer_registered
bool destructive_reclaimer_registered
have we scheduled a destructive cleanup?
Definition: internal.h:454
GRPC_DTS_CLIENT_PREFIX_11
@ GRPC_DTS_CLIENT_PREFIX_11
Definition: internal.h:147
GRPC_DTS_CLIENT_PREFIX_3
@ GRPC_DTS_CLIENT_PREFIX_3
Definition: internal.h:139
GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM
@ GRPC_CHTTP2_INITIATE_WRITE_START_NEW_STREAM
Definition: internal.h:85
GRPC_DTS_FH_7
@ GRPC_DTS_FH_7
Definition: internal.h:169
GRPC_DTS_CLIENT_PREFIX_7
@ GRPC_DTS_CLIENT_PREFIX_7
Definition: internal.h:143
grpc_chttp2_stream::recv_initial_metadata
grpc_metadata_batch * recv_initial_metadata
Definition: internal.h:547
grpc_chttp2_repeated_ping_state::is_delayed_ping_timer_set
bool is_delayed_ping_timer_set
Definition: internal.h:125
grpc_chttp2_transport::incoming_frame_type
uint8_t incoming_frame_type
Definition: internal.h:421
grpc_channel_args
An array of arguments that can be passed around.
Definition: grpc_types.h:132
grpc_chttp2_stream::recv_trailing_metadata_finished
grpc_closure * recv_trailing_metadata_finished
Definition: internal.h:553
GRPC_CHTTP2_KEEPALIVE_STATE_DYING
@ GRPC_CHTTP2_KEEPALIVE_STATE_DYING
Definition: internal.h:286
grpc_chttp2_stream
Definition: internal.h:508
grpc_chttp2_transport::settings
grpc_chttp2_settings_parser settings
Definition: internal.h:402
grpc_chttp2_transport::accepting_stream
grpc_chttp2_stream ** accepting_stream
address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used b...
Definition: internal.h:336
grpc_core::PolymorphicManualConstructor
Definition: manual_constructor.h:104
GRPC_DTS_FH_5
@ GRPC_DTS_FH_5
Definition: internal.h:167
grpc_chttp2_stream::read_closed
bool read_closed
Is this stream reading half-closed.
Definition: internal.h:561
grpc_core::Chttp2IncomingByteStream::on_complete
grpc_closure * on_complete
Definition: internal.h:276
grpc_chttp2_list_remove_stalled_by_stream
bool grpc_chttp2_list_remove_stalled_by_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:213
grpc_core::Chttp2IncomingByteStream::Unref
void Unref()
Definition: internal.h:240
grpc_chttp2_transport::closed_with_error
grpc_error * closed_with_error
has the upper layer closed the transport?
Definition: internal.h:313
GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY
@ GRPC_CHTTP2_LIST_WAITING_FOR_CONCURRENCY
streams that are waiting to start because there are too many concurrent streams on the connection
Definition: internal.h:61
grpc_core::RefCountedPtr< grpc_core::channelz::SocketNode >
grpc_chttp2_initiate_write_reason_string
const char * grpc_chttp2_initiate_write_reason_string(grpc_chttp2_initiate_write_reason reason)
Definition: chttp2_transport.cc:3253
grpc_core::Chttp2IncomingByteStream::Orphan
void Orphan() override
Definition: chttp2_transport.cc:2976
grpc_chttp2_stream::unprocessed_incoming_frames_buffer_cached_length
size_t unprocessed_incoming_frames_buffer_cached_length
Definition: internal.h:593
grpc_chttp2_ping_closure_list
grpc_chttp2_ping_closure_list
Definition: internal.h:76
GRPC_CHTTP2_LIST_WRITABLE
@ GRPC_CHTTP2_LIST_WRITABLE
Definition: internal.h:55
GRPC_DTS_CLIENT_PREFIX_17
@ GRPC_DTS_CLIENT_PREFIX_17
Definition: internal.h:153
GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED
@ GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED
Definition: internal.h:287
GRPC_DTS_FH_1
@ GRPC_DTS_FH_1
Definition: internal.h:163
grpc_core::chttp2::TransportFlowControlDisabled
Definition: flow_control.h:202
grpc_chttp2_repeated_ping_state::delayed_ping_timer
grpc_timer delayed_ping_timer
Definition: internal.h:124
grpc_chttp2_stream::flow_control
grpc_core::PolymorphicManualConstructor< grpc_core::chttp2::StreamFlowControlBase, grpc_core::chttp2::StreamFlowControl, grpc_core::chttp2::StreamFlowControlDisabled > flow_control
Definition: internal.h:623
grpc_chttp2_repeated_ping_policy
Definition: internal.h:114
grpc_chttp2_mark_stream_writable
void grpc_chttp2_mark_stream_writable(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
add a ref to the stream and add it to the writable list; ref will be dropped in writing....
Definition: chttp2_transport.cc:924
grpc_chttp2_stream::complete_fetch_locked
grpc_closure complete_fetch_locked
Definition: internal.h:544
grpc_chttp2_write_state
grpc_chttp2_write_state
Definition: internal.h:65
GRPC_DTS_FH_4
@ GRPC_DTS_FH_4
Definition: internal.h:166
grpc_chttp2_incoming_metadata_buffer
Definition: incoming_metadata.h:26
grpc_chttp2_transport::base
grpc_transport base
Definition: internal.h:296
hpack_parser.h
grpc_chttp2_stream::reset_byte_stream
grpc_closure reset_byte_stream
Definition: internal.h:598
GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING
@ GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING
Definition: internal.h:97
grpc_chttp2_transport::num_pending_induced_frames
uint32_t num_pending_induced_frames
The number of pending induced frames (SETTINGS_ACK, PINGS_ACK and RST_STREAM) in the outgoing buffer ...
Definition: internal.h:497
grpc_chttp2_list_remove_writable_stream
bool grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:152
grpc_chttp2_transport::keepalive_watchdog_timer
grpc_timer keepalive_watchdog_timer
watchdog to kill the transport when waiting for the keepalive ping
Definition: internal.h:478
GRPC_SENT_SETTINGS
@ GRPC_SENT_SETTINGS
Definition: internal.h:193
GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API
@ GRPC_CHTTP2_INITIATE_WRITE_CLOSE_FROM_API
Definition: internal.h:93
grpc_chttp2_stream::Reffer
Definition: internal.h:519
stream_compression.h
grpc_chttp2_maybe_complete_recv_initial_metadata
void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: chttp2_transport.cc:1863
grpc_core::Chttp2IncomingByteStream::Shutdown
void Shutdown(grpc_error *error) override
Definition: chttp2_transport.cc:3143
GRPC_DTS_CLIENT_PREFIX_18
@ GRPC_DTS_CLIENT_PREFIX_18
Definition: internal.h:154
grpc_chttp2_transport::initial_window_update
int64_t initial_window_update
initial window change.
Definition: internal.h:417
grpc_chttp2_stream::destroy_stream_arg
grpc_closure * destroy_stream_arg
Definition: internal.h:524
GRPC_CHTTP2_LIST_WRITING
@ GRPC_CHTTP2_LIST_WRITING
Definition: internal.h:56
grpc_chttp2_stream::recv_message_ready
grpc_closure * recv_message_ready
Definition: internal.h:551
grpc_core::chttp2::StreamFlowControlBase
Definition: flow_control.h:339
grpc_chttp2_stream_map_find
void * grpc_chttp2_stream_map_find(grpc_chttp2_stream_map *map, uint32_t key)
Definition: stream_map.cc:145
grpc_chttp2_stream::frame_storage
grpc_slice_buffer frame_storage
Definition: internal.h:585
grpc_chttp2_transport::accept_stream_cb
void(* accept_stream_cb)(void *user_data, grpc_transport *transport, const void *server_data)
Definition: internal.h:339
grpc_chttp2_stream::fetching_send_message
grpc_core::OrphanablePtr< grpc_core::ByteStream > fetching_send_message
Definition: internal.h:538
grpc_chttp2_list_add_waiting_for_concurrency
void grpc_chttp2_list_add_waiting_for_concurrency(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:171
grpc_chttp2_transport::hpack_parser
grpc_chttp2_hpack_parser hpack_parser
parser for headers
Definition: internal.h:398
grpc_core::Chttp2IncomingByteStream::Push
grpc_error * Push(const grpc_slice &slice, grpc_slice *slice_out)
Definition: chttp2_transport.cc:3110
grpc_chttp2_list_pop_stalled_by_stream
bool grpc_chttp2_list_pop_stalled_by_stream(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
Definition: stream_lists.cc:208
grpc_chttp2_transport::sent_local_settings
bool sent_local_settings
have local settings been sent?
Definition: internal.h:369
GRPC_DTS_CLIENT_PREFIX_14
@ GRPC_DTS_CLIENT_PREFIX_14
Definition: internal.h:150
grpc_chttp2_list_pop_written_stream
bool grpc_chttp2_list_pop_written_stream(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
grpc_chttp2_transport::destructive_reclaimer_locked
grpc_closure destructive_reclaimer_locked
destructive cleanup closure
Definition: internal.h:458
grpc_chttp2_transport::next_bdp_ping_timer_expired_locked
grpc_closure next_bdp_ping_timer_expired_locked
Definition: internal.h:439
grpc_chttp2_transport::force_send_settings
uint32_t force_send_settings
bitmask of setting indexes to send out Hack: it's common for implementations to assume 65536 bytes in...
Definition: internal.h:373
grpc_chttp2_transport::goaway_error
grpc_error * goaway_error
Set to a grpc_error object if a goaway frame is received.
Definition: internal.h:362
grpc_core::Chttp2IncomingByteStream::max_size_hint
size_t max_size_hint
Definition: internal.h:275
GPR_UNLIKELY
#define GPR_UNLIKELY(x)
Definition: port_platform.h:702
grpc_chttp2_transport::hpack_compressor
grpc_chttp2_hpack_compressor hpack_compressor
hpack encoding
Definition: internal.h:349
grpc_resource_user
Definition: resource_quota.cc:63
grpc_chttp2_transport::is_client
bool is_client
is this a client?
Definition: internal.h:351
grpc_chttp2_transport::write_buffer_size
uint32_t write_buffer_size
how much data are we willing to buffer when the WRITE_BUFFER_HINT is set?
Definition: internal.h:358
GRPC_CHTTP2_KEEPALIVE_STATE_WAITING
@ GRPC_CHTTP2_KEEPALIVE_STATE_WAITING
Definition: internal.h:284
grpc_chttp2_transport::goaway_parser
grpc_chttp2_goaway_parser goaway_parser
parser for goaway frames
Definition: internal.h:407
grpc_chttp2_transport::ping_ack_capacity
size_t ping_ack_capacity
Definition: internal.h:393
grpc_chttp2_transport::ping_recv_state
grpc_chttp2_server_ping_recv_state ping_recv_state
Definition: internal.h:395
grpc_chttp2_stream::trailing_metadata_available
bool * trailing_metadata_available
Definition: internal.h:549
grpc_chttp2_stream::received_last_frame
bool received_last_frame
Definition: internal.h:600
frame_goaway.h
grpc_chttp2_list_add_written_stream
void grpc_chttp2_list_add_written_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
grpc_stream_compression_method
grpc_stream_compression_method
Definition: stream_compression.h:38
GRPC_METADATA_PUBLISHED_AT_CLOSE
@ GRPC_METADATA_PUBLISHED_AT_CLOSE
Definition: internal.h:505
grpc_chttp2_stream::write_closed
bool write_closed
Is this stream closed for writing.
Definition: internal.h:559
GRPC_DTS_CLIENT_PREFIX_9
@ GRPC_DTS_CLIENT_PREFIX_9
Definition: internal.h:145
grpc_chttp2_stream::forced_close_error
grpc_error * forced_close_error
saw some stream level error
Definition: internal.h:605
timer.h
grpc_chttp2_transport::resource_user
grpc_resource_user * resource_user
Definition: internal.h:301
grpc_chttp2_transport::write_state
grpc_chttp2_write_state write_state
write execution state of the transport
Definition: internal.h:308
grpc_core::ContextList
A list of RPC Contexts.
Definition: context_list.h:30
GRPC_DTS_CLIENT_PREFIX_8
@ GRPC_DTS_CLIENT_PREFIX_8
Definition: internal.h:144
GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA
@ GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA
Definition: internal.h:87
GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING
@ GRPC_CHTTP2_INITIATE_WRITE_RETRY_SEND_PING
Definition: internal.h:89
grpc_core::chttp2::StreamFlowControlDisabled
Definition: flow_control.h:393
grpc_chttp2_stream::eos_received
bool eos_received
Definition: internal.h:572
grpc_chttp2_transport::~grpc_chttp2_transport
~grpc_chttp2_transport()
Definition: chttp2_transport.cc:175
grpc_chttp2_transport::window_update
grpc_chttp2_window_update_parser window_update
Definition: internal.h:401
grpc_chttp2_fake_status
void grpc_chttp2_fake_status(grpc_chttp2_transport *t, grpc_chttp2_stream *stream, grpc_error *error)
Definition: chttp2_transport.cc:2096
grpc_chttp2_transport::read_action_locked
grpc_closure read_action_locked
Definition: internal.h:328
grpc_slice
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
GRPC_CHTTP2_OPTIMIZE_FOR_THROUGHPUT
@ GRPC_CHTTP2_OPTIMIZE_FOR_THROUGHPUT
Definition: internal.h:73
incoming_metadata.h
grpc_chttp2_stream::decompressed_header_bytes
size_t decompressed_header_bytes
gRPC header bytes that are already decompressed
Definition: internal.h:645
grpc_chttp2_begin_write_result::early_results_scheduled
bool early_results_scheduled
did we queue any completions as part of beginning the write
Definition: internal.h:687
GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE
@ GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE
Definition: internal.h:98
grpc_chttp2_stream::stats
grpc_transport_stream_stats stats
Definition: internal.h:556
frame_ping.h
GRPC_CHTTP2_NO_GOAWAY_SEND
@ GRPC_CHTTP2_NO_GOAWAY_SEND
Definition: internal.h:200
GRPC_CHTTP2_PCL_COUNT
@ GRPC_CHTTP2_PCL_COUNT
Definition: internal.h:80
grpc_chttp2_stream::send_trailing_metadata_finished
grpc_closure * send_trailing_metadata_finished
Definition: internal.h:536
grpc_chttp2_transport::accept_stream_cb_user_data
void * accept_stream_cb_user_data
Definition: internal.h:341
grpc_chttp2_stream::finish_after_write
grpc_chttp2_write_cb * finish_after_write
Definition: internal.h:629
grpc_chttp2_transport::refs
grpc_core::RefCount refs
Definition: internal.h:297
grpc_chttp2_transport::run_after_write
grpc_closure_list run_after_write
Definition: internal.h:448
GRPC_STREAM_COMPRESSION_IDENTITY_COMPRESS
@ GRPC_STREAM_COMPRESSION_IDENTITY_COMPRESS
Definition: stream_compression.h:39
GRPC_DTS_FRAME
@ GRPC_DTS_FRAME
Definition: internal.h:173
grpc_chttp2_stream::sent_initial_metadata
bool sent_initial_metadata
Definition: internal.h:616
grpc_chttp2_stream::included
uint8_t included[STREAM_LIST_COUNT]
Definition: internal.h:527
grpc_chttp2_list_remove_waiting_for_concurrency
void grpc_chttp2_list_remove_waiting_for_concurrency(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:181
grpc_chttp2_transport::keepalive_time
grpc_millis keepalive_time
time duration in between pings
Definition: internal.h:480
grpc_chttp2_stream::links
grpc_chttp2_stream_link links[STREAM_LIST_COUNT]
Definition: internal.h:526
grpc_core::chttp2::TransportFlowControlBase
Definition: flow_control.h:145
grpc_chttp2_add_incoming_goaway
void grpc_chttp2_add_incoming_goaway(grpc_chttp2_transport *t, uint32_t goaway_error, uint32_t last_stream_id, const grpc_slice &goaway_text)
Definition: chttp2_transport.cc:1066
grpc_chttp2_transport::keepalive_permit_without_calls
bool keepalive_permit_without_calls
if keepalive pings are allowed when there's no outstanding streams
Definition: internal.h:484
grpc_chttp2_stream::fetching_slice
grpc_slice fetching_slice
Definition: internal.h:540
grpc_chttp2_transport::keepalive_state
grpc_chttp2_keepalive_state keepalive_state
keep-alive state machine state
Definition: internal.h:488
grpc_core::Chttp2IncomingByteStream::Ref
void Ref()
Definition: internal.h:239
grpc_chttp2_ref_transport
void grpc_chttp2_ref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line)
Definition: internal.h:820
grpc_chttp2_transport::dirtied_local_settings
bool dirtied_local_settings
are the local settings dirty and need to be sent?
Definition: internal.h:367
grpc_chttp2_server_ping_recv_state::last_ping_recv_time
grpc_millis last_ping_recv_time
Definition: internal.h:129
grpc_chttp2_transport::keepalive_timeout
grpc_millis keepalive_timeout
grace period for a ping to complete before watchdog kicks in
Definition: internal.h:482
GRPC_NUM_SETTING_SETS
@ GRPC_NUM_SETTING_SETS
Definition: internal.h:196
grpc_chttp2_stream::context
void * context
Definition: internal.h:513
manual_constructor.h
grpc_chttp2_stream::stream_compression_ctx
grpc_stream_compression_context * stream_compression_ctx
Stream compression compress context.
Definition: internal.h:653
grpc_chttp2_begin_write_result
Definition: internal.h:681
grpc_chttp2_stream::seen_error
bool seen_error
Has this stream seen an error.
Definition: internal.h:566
grpc_chttp2_transport::keepalive_ping_timer
grpc_timer keepalive_ping_timer
timer to initiate ping events
Definition: internal.h:476
stream_map.h
grpc_chttp2_begin_write
grpc_chttp2_begin_write_result grpc_chttp2_begin_write(grpc_chttp2_transport *t)
Definition: writing.cc:632
grpc_chttp2_stream::~grpc_chttp2_stream
~grpc_chttp2_stream()
Definition: chttp2_transport.cc:658
grpc_chttp2_transport::benign_reclaimer_locked
grpc_closure benign_reclaimer_locked
benign cleanup closure
Definition: internal.h:456
frame.h
grpc_chttp2_stream_map
Definition: stream_map.h:32
grpc_closure_list
Definition: closure.h:41
grpc_chttp2_transport::incoming_frame_size
uint32_t incoming_frame_size
Definition: internal.h:426
grpc_millis
int64_t grpc_millis
Definition: exec_ctx.h:35
GRPC_CHTTP2_INITIATE_WRITE_FORCE_RST_STREAM
@ GRPC_CHTTP2_INITIATE_WRITE_FORCE_RST_STREAM
Definition: internal.h:103
grpc_chttp2_stream::destroy_stream
grpc_closure destroy_stream
Definition: internal.h:523
GRPC_PEER_SETTINGS
@ GRPC_PEER_SETTINGS
Definition: internal.h:189
grpc_chttp2_stream::send_initial_metadata_finished
grpc_closure * send_initial_metadata_finished
Definition: internal.h:534
grpc_chttp2_transport::reading_paused_on_pending_induced_frames
bool reading_paused_on_pending_induced_frames
Definition: internal.h:498
grpc_chttp2_ping_parser
Definition: frame_ping.h:27
grpc_chttp2_transport::have_next_bdp_ping_timer
bool have_next_bdp_ping_timer
Definition: internal.h:461
grpc_chttp2_transport::keepalive_watchdog_fired_locked
grpc_closure keepalive_watchdog_fired_locked
Closrue to run when the keepalive ping timeouts.
Definition: internal.h:474
GRPC_CHTTP2_WRITE_STATE_WRITING
@ GRPC_CHTTP2_WRITE_STATE_WRITING
Definition: internal.h:67
grpc_chttp2_stream::flow_controlled_bytes_flowed
int64_t flow_controlled_bytes_flowed
Definition: internal.h:543
grpc_chttp2_retry_initiate_ping
void grpc_chttp2_retry_initiate_ping(void *tp, grpc_error *error)
Definition: chttp2_transport.cc:1738
grpc_chttp2_list_remove_stalled_by_transport
void grpc_chttp2_list_remove_stalled_by_transport(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:197
grpc_chttp2_initiate_write
void grpc_chttp2_initiate_write(grpc_chttp2_transport *t, grpc_chttp2_initiate_write_reason reason)
Transport writing call flow: grpc_chttp2_initiate_write() is called anywhere that we know bytes need ...
Definition: chttp2_transport.cc:884
grpc_chttp2_transport::start_keepalive_ping_locked
grpc_closure start_keepalive_ping_locked
Closure to run when the keepalive ping is sent.
Definition: internal.h:470
grpc_chttp2_stream_list
Definition: internal.h:176
GRPC_DTS_CLIENT_PREFIX_12
@ GRPC_DTS_CLIENT_PREFIX_12
Definition: internal.h:148
grpc_core::Chttp2IncomingByteStream::Pull
grpc_error * Pull(grpc_slice *slice) override
Definition: chttp2_transport.cc:3055
grpc_chttp2_transport::settings
uint32_t settings[GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]
settings values
Definition: internal.h:375
GRPC_DTS_CLIENT_PREFIX_20
@ GRPC_DTS_CLIENT_PREFIX_20
Definition: internal.h:156
GRPC_DTS_CLIENT_PREFIX_10
@ GRPC_DTS_CLIENT_PREFIX_10
Definition: internal.h:146
grpc_chttp2_stream::stream_compression_method
grpc_stream_compression_method stream_compression_method
Definition: internal.h:633
grpc_core::RefCount
Definition: ref_counted.h:62
GRPC_CHTTP2_NUM_SETTINGS
#define GRPC_CHTTP2_NUM_SETTINGS
Definition: http2_settings.h:39
grpc_chttp2_transport::simple
union grpc_chttp2_transport::@11 simple
simple one shot parsers
grpc_chttp2_stream_list_id
grpc_chttp2_stream_list_id
Definition: internal.h:54
grpc_chttp2_transport::ep
grpc_endpoint * ep
Definition: internal.h:298
grpc_chttp2_stream::collecting_stats
grpc_transport_stream_stats * collecting_stats
Definition: internal.h:555
grpc_chttp2_repeated_ping_state::last_ping_sent_time
grpc_millis last_ping_sent_time
Definition: internal.h:122
grpc_chttp2_repeated_ping_policy::min_recv_ping_interval_without_data
grpc_millis min_recv_ping_interval_without_data
Definition: internal.h:118
grpc_core::Arena
Definition: arena.h:44
grpc_chttp2_begin_write_result::writing
bool writing
are we writing?
Definition: internal.h:683
GRPC_CHTTP2_PCL_INITIATE
@ GRPC_CHTTP2_PCL_INITIATE
Definition: internal.h:77
GRPC_CHTTP2_PCL_INFLIGHT
@ GRPC_CHTTP2_PCL_INFLIGHT
Definition: internal.h:79
grpc_chttp2_stream::pending_byte_stream
bool pending_byte_stream
Definition: internal.h:588
grpc_chttp2_ack_ping
void grpc_chttp2_ack_ping(grpc_chttp2_transport *t, uint64_t id)
Definition: chttp2_transport.cc:1754
grpc_chttp2_transport::parser_data
void * parser_data
Definition: internal.h:430
GRPC_STREAM_COMPRESSION_IDENTITY_DECOMPRESS
@ GRPC_STREAM_COMPRESSION_IDENTITY_DECOMPRESS
Definition: stream_compression.h:40
grpc_chttp2_stream::all_incoming_byte_streams_finished
bool all_incoming_byte_streams_finished
Are all published incoming byte streams closed.
Definition: internal.h:563
grpc_transport_stream_stats
Definition: transport.h:128
GRPC_METADATA_NOT_PUBLISHED
@ GRPC_METADATA_NOT_PUBLISHED
Definition: internal.h:502
GRPC_MILLIS_INF_FUTURE
#define GRPC_MILLIS_INF_FUTURE
Definition: exec_ctx.h:37
grpc_chttp2_transport::channelz_socket
grpc_core::RefCountedPtr< grpc_core::channelz::SocketNode > channelz_socket
Definition: internal.h:490
GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY
@ GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY
Definition: internal.h:72
GRPC_CHTTP2_LIST_STALLED_BY_STREAM
@ GRPC_CHTTP2_LIST_STALLED_BY_STREAM
Definition: internal.h:58
grpc_chttp2_transport::finish_bdp_ping_locked
grpc_closure finish_bdp_ping_locked
Definition: internal.h:441
grpc_chttp2_data_parser
Definition: frame_data.h:46
GRPC_DTS_FH_3
@ GRPC_DTS_FH_3
Definition: internal.h:165
grpc_chttp2_transport::outbuf
grpc_slice_buffer outbuf
data to write now
Definition: internal.h:347
GRPC_METADATA_SYNTHESIZED_FROM_FAKE
@ GRPC_METADATA_SYNTHESIZED_FROM_FAKE
Definition: internal.h:503
grpc_chttp2_transport::state_tracker
grpc_core::ConnectivityStateTracker state_tracker
connectivity tracking
Definition: internal.h:344
grpc_chttp2_transport::bdp_ping_started
bool bdp_ping_started
If start_bdp_ping_locked has been called.
Definition: internal.h:463
frame_window_update.h
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:68
grpc_chttp2_stream::sent_trailing_metadata
bool sent_trailing_metadata
Definition: internal.h:617
grpc_chttp2_transport::endpoint_reading
uint8_t endpoint_reading
is there a read request to the endpoint outstanding?
Definition: internal.h:316
grpc_chttp2_config_default_keepalive_args
void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, bool is_client)
Set the default keepalive configurations, must only be called at initialization.
Definition: chttp2_transport.cc:2699
grpc_chttp2_transport::next_bdp_ping_timer
grpc_timer next_bdp_ping_timer
Definition: internal.h:464
grpc_chttp2_stream::send_trailing_metadata
grpc_metadata_batch * send_trailing_metadata
Definition: internal.h:535
GRPC_DTS_CLIENT_PREFIX_0
@ GRPC_DTS_CLIENT_PREFIX_0
Definition: internal.h:136
grpc_chttp2_stream::metadata_buffer
grpc_chttp2_incoming_metadata_buffer metadata_buffer[2]
Definition: internal.h:583
grpc_chttp2_list_add_writing_stream
bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:157
grpc_chttp2_stream::data_parser
grpc_chttp2_data_parser data_parser
parsing state for data frames
Definition: internal.h:612
GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING
@ GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING
Definition: internal.h:100
grpc_chttp2_transport::finish_keepalive_ping_locked
grpc_closure finish_keepalive_ping_locked
Cousure to run when the keepalive ping ack is received.
Definition: internal.h:472
grpc_chttp2_parsing_lookup_stream
grpc_chttp2_stream * grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport *t, uint32_t id)
Definition: internal.h:749
grpc_chttp2_transport::ping_acks
uint64_t * ping_acks
Definition: internal.h:394
grpc_chttp2_stream::send_initial_metadata
grpc_metadata_batch * send_initial_metadata
things the upper layers would like to send
Definition: internal.h:533
flow_control.h
grpc_chttp2_stream::byte_stream_error
grpc_error * byte_stream_error
Definition: internal.h:599
grpc_chttp2_stream_ref
void grpc_chttp2_stream_ref(grpc_chttp2_stream *s, const char *reason)
Definition: chttp2_transport.cc:605
GRPC_DTS_CLIENT_PREFIX_13
@ GRPC_DTS_CLIENT_PREFIX_13
Definition: internal.h:149
grpc_chttp2_deframe_transport_state
grpc_chttp2_deframe_transport_state
Definition: internal.h:134
grpc_chttp2_transport::ping_ctr
uint64_t ping_ctr
Definition: internal.h:388
GRPC_DTS_CLIENT_PREFIX_1
@ GRPC_DTS_CLIENT_PREFIX_1
Definition: internal.h:137
grpc_chttp2_stream::on_write_finished_cbs
grpc_chttp2_write_cb * on_write_finished_cbs
Definition: internal.h:628
combiner.h
grpc_chttp2_rst_stream_parser
Definition: frame_rst_stream.h:28
grpc_chttp2_stream::refcount
grpc_stream_refcount * refcount
Definition: internal.h:515
grpc_chttp2_repeated_ping_policy::max_ping_strikes
int max_ping_strikes
Definition: internal.h:116
GRPC_DTS_FH_6
@ GRPC_DTS_FH_6
Definition: internal.h:168
grpc_chttp2_transport
Definition: internal.h:290
hpack_encoder.h
GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
@ GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
Definition: http2_settings.h:33
grpc_chttp2_write_cb
struct grpc_chttp2_write_cb grpc_chttp2_write_cb
grpc_chttp2_stream::published_metadata
grpc_published_metadata_method published_metadata[2]
Definition: internal.h:580
grpc_chttp2_unref_transport
void grpc_chttp2_unref_transport(grpc_chttp2_transport *t, const char *reason, const char *file, int line)
Definition: internal.h:813
grpc_core::chttp2::TransportFlowControl
Definition: flow_control.h:222
grpc_chttp2_stream::fetched_send_message_length
uint32_t fetched_send_message_length
Definition: internal.h:539
grpc_chttp2_list_pop_writing_stream
bool grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
Definition: stream_lists.cc:166
grpc_chttp2_transport::ping_state
grpc_chttp2_repeated_ping_state ping_state
Definition: internal.h:387
grpc_chttp2_complete_closure_step
void grpc_chttp2_complete_closure_step(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_closure **pclosure, grpc_error *error, const char *desc)
Definition: chttp2_transport.cc:1185
grpc_transport
Definition: transport_impl.h:66
STREAM_LIST_COUNT
@ STREAM_LIST_COUNT
Definition: internal.h:62
grpc_chttp2_transport::num_messages_in_next_write
uint32_t num_messages_in_next_write
Definition: internal.h:491
grpc_chttp2_hpack_compressor
Definition: hpack_encoder.h:41
grpc_core::ByteStream::flags
uint32_t flags() const
Definition: byte_stream.h:66
grpc_chttp2_transport::deframe_state
grpc_chttp2_deframe_transport_state deframe_state
Definition: internal.h:420
grpc_chttp2_stream::flow_controlled_buffer
grpc_slice_buffer flow_controlled_buffer
Definition: internal.h:625
grpc_chttp2_mark_stream_closed
void grpc_chttp2_mark_stream_closed(grpc_chttp2_transport *t, grpc_chttp2_stream *s, int close_reads, int close_writes, grpc_error *error)
Definition: chttp2_transport.cc:2196
grpc_chttp2_write_cb
Definition: internal.h:205
grpc_chttp2_transport::rst_stream
grpc_chttp2_rst_stream_parser rst_stream
Definition: internal.h:404
grpc_chttp2_stream::stream_decompression_ctx
grpc_stream_compression_context * stream_decompression_ctx
Stream compression decompress context.
Definition: internal.h:658
grpc_chttp2_stream::fetching_send_message_finished
grpc_closure * fetching_send_message_finished
Definition: internal.h:545
GRPC_DTS_CLIENT_PREFIX_4
@ GRPC_DTS_CLIENT_PREFIX_4
Definition: internal.h:140
grpc_chttp2_transport::is_first_frame
bool is_first_frame
Definition: internal.h:424
GRPC_CHTTP2_PCL_NEXT
@ GRPC_CHTTP2_PCL_NEXT
Definition: internal.h:78
grpc_chttp2_add_ping_strike
void grpc_chttp2_add_ping_strike(grpc_chttp2_transport *t)
Add a new ping strike to ping_recv_state.ping_strikes.
Definition: chttp2_transport.cc:1785
GRPC_CHTTP2_KEEPALIVE_STATE_PINGING
@ GRPC_CHTTP2_KEEPALIVE_STATE_PINGING
Definition: internal.h:285
GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS
@ GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS
Definition: internal.h:96
GRPC_DTS_CLIENT_PREFIX_19
@ GRPC_DTS_CLIENT_PREFIX_19
Definition: internal.h:155
GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL
@ GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL
Definition: internal.h:95
grpc_chttp2_stream::on_flow_controlled_cbs
grpc_chttp2_write_cb * on_flow_controlled_cbs
Definition: internal.h:627
grpc_chttp2_stream::received_bytes
int64_t received_bytes
number of bytes received - reset at end of parse thread execution
Definition: internal.h:614
grpc_chttp2_transport::ping_ack_count
size_t ping_ack_count
ping acks
Definition: internal.h:392
grpc_slice_buffer
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
transport_impl.h
GRPC_DTS_CLIENT_PREFIX_5
@ GRPC_DTS_CLIENT_PREFIX_5
Definition: internal.h:141
grpc_chttp2_transport::cl
grpc_core::ContextList * cl
Definition: internal.h:489
endpoint.h
GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM
@ GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM
Definition: internal.h:92
GRPC_DTS_CLIENT_PREFIX_16
@ GRPC_DTS_CLIENT_PREFIX_16
Definition: internal.h:152
grpc_chttp2_stream::unprocessed_incoming_frames_decompressed
bool unprocessed_incoming_frames_decompressed
Whether bytes stored in unprocessed_incoming_byte_stream is decompressed.
Definition: internal.h:641
grpc_error
Definition: error_internal.h:39
grpc_chttp2_stream::decompressed_data_buffer
grpc_slice_buffer decompressed_data_buffer
Temporary buffer storing decompressed data.
Definition: internal.h:663
grpc_chttp2_transport::incoming_stream
grpc_chttp2_stream * incoming_stream
Definition: internal.h:431
grpc_chttp2_transport::notify_on_receive_settings
grpc_closure * notify_on_receive_settings
Definition: internal.h:305
grpc_chttp2_transport::last_new_stream_id
uint32_t last_new_stream_id
last new stream id
Definition: internal.h:382
grpc_chttp2_transport::ping
grpc_chttp2_ping_parser ping
Definition: internal.h:403
grpc_chttp2_transport::write_action
grpc_closure write_action
Definition: internal.h:325
grpc_chttp2_ping_queue
Definition: internal.h:109
grpc_chttp2_list_add_writable_stream
bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:141
grpc_metadata_batch
Definition: metadata_batch.h:49
grpc_chttp2_stream::reffer
struct grpc_chttp2_stream::Reffer reffer
grpc_chttp2_write_cb::next
struct grpc_chttp2_write_cb * next
Definition: internal.h:208
grpc_core::Chttp2IncomingByteStream::PublishError
void PublishError(grpc_error *error)
Definition: chttp2_transport.cc:3100
grpc_chttp2_stream::header_frames_received
uint8_t header_frames_received
how many header frames have we received?
Definition: internal.h:607
grpc_chttp2_list_add_stalled_by_transport
void grpc_chttp2_list_add_stalled_by_transport(grpc_chttp2_transport *t, grpc_chttp2_stream *s)
Definition: stream_lists.cc:186
grpc_chttp2_list_pop_writable_stream
bool grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream **s)
Get a writable stream returns non-zero if there was a stream available.
Definition: stream_lists.cc:147
GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA
@ GRPC_CHTTP2_INITIATE_WRITE_SEND_TRAILING_METADATA
Definition: internal.h:88
grpc_chttp2_sent_goaway_state
grpc_chttp2_sent_goaway_state
Definition: internal.h:199
grpc_chttp2_transport::retry_initiate_ping_locked
grpc_closure retry_initiate_ping_locked
Definition: internal.h:389
frame_rst_stream.h
GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE
@ GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE
Definition: internal.h:84
grpc_closure
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT
@ GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT
Definition: internal.h:57
grpc_chttp2_transport::next_stream_id
uint32_t next_stream_id
what is the next stream id to be allocated by this peer? copied to next_stream_id in parsing when par...
Definition: internal.h:379
grpc_chttp2_cancel_stream
void grpc_chttp2_cancel_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *due_to_error)
Definition: chttp2_transport.cc:2072
grpc_endpoint
Definition: endpoint.h:102
grpc_chttp2_transport::header_eof
uint8_t header_eof
Definition: internal.h:423
GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT
@ GRPC_CHTTP2_INITIATE_WRITE_GOAWAY_SENT
Definition: internal.h:91
grpc_chttp2_stream::eos_sent
bool eos_sent
Definition: internal.h:573
GRPC_DTS_CLIENT_PREFIX_15
@ GRPC_DTS_CLIENT_PREFIX_15
Definition: internal.h:151
grpc_chttp2_stream::final_metadata_requested
bool final_metadata_requested
Definition: internal.h:581
grpc_chttp2_stream::write_buffering
bool write_buffering
Are we buffering writes on this stream? If yes, we won't become writable until there's enough queued ...
Definition: internal.h:569
grpc_chttp2_transport::read_buffer
grpc_slice_buffer read_buffer
incoming read bytes
Definition: internal.h:331
grpc_chttp2_stream::uncompressed_data_size
size_t uncompressed_data_size
Amount of uncompressed bytes sent out when compressed_data_buffer is emptied.
Definition: internal.h:651
grpc_stream_refcount
Definition: transport.h:56
grpc_chttp2_parsing_accept_stream
grpc_chttp2_stream * grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport *t, uint32_t id)
Definition: chttp2_transport.cc:753
grpc_chttp2_stream::traced
bool traced
Whether the bytes needs to be traced using Fathom.
Definition: internal.h:643
grpc_chttp2_stream::Reffer::Reffer
Reffer(grpc_chttp2_stream *s)
Definition: chttp2_transport.cc:620
grpc_chttp2_stream::deadline
grpc_millis deadline
Definition: internal.h:602
GRPC_DTS_CLIENT_PREFIX_6
@ GRPC_DTS_CLIENT_PREFIX_6
Definition: internal.h:142
grpc_chttp2_stream_list::tail
grpc_chttp2_stream * tail
Definition: internal.h:178
grpc_chttp2_transport::close_transport_on_writes_finished
grpc_error * close_transport_on_writes_finished
Definition: internal.h:445
grpc_empty_slice
GPRAPI grpc_slice grpc_empty_slice(void)
Definition: slice.cc:40
grpc_chttp2_stream::sending_bytes
size_t sending_bytes
Definition: internal.h:630
GRPC_LOCAL_SETTINGS
@ GRPC_LOCAL_SETTINGS
Definition: internal.h:191
GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING
@ GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING
Definition: internal.h:99
grpc_chttp2_repeated_ping_policy::min_sent_ping_interval_without_data
grpc_millis min_sent_ping_interval_without_data
Definition: internal.h:117
grpc_published_metadata_method
grpc_published_metadata_method
Definition: internal.h:501
port_platform.h
grpc_chttp2_transport::combiner
grpc_core::Combiner * combiner
Definition: internal.h:303
grpc_chttp2_transport::keepalive_ping_started
bool keepalive_ping_started
If start_keepalive_ping_locked has been called.
Definition: internal.h:486
grpc_chttp2_transport::benign_reclaimer_registered
bool benign_reclaimer_registered
have we scheduled a benign cleanup?
Definition: internal.h:452