Public Member Functions | Public Attributes | List of all members
grpc_chttp2_transport Struct Reference

#include <internal.h>

Public Member Functions

 grpc_chttp2_transport (const grpc_channel_args *channel_args, grpc_endpoint *ep, bool is_client)
 
 ~grpc_chttp2_transport ()
 

Public Attributes

void(* accept_stream_cb )(void *user_data, grpc_transport *transport, const void *server_data)
 
void * accept_stream_cb_user_data
 
grpc_chttp2_stream ** accepting_stream = nullptr
 
grpc_core::ReclamationSweep active_reclamation
 
grpc_transport base
 
bool bdp_ping_blocked
 
bool bdp_ping_started = false
 
grpc_closure benign_reclaimer_locked
 
bool benign_reclaimer_registered = false
 
grpc_core::RefCountedPtr< grpc_core::channelz::SocketNodechannelz_socket
 
grpc_core::ContextListcl = nullptr
 
grpc_error_handle close_transport_on_writes_finished = GRPC_ERROR_NONE
 
grpc_error_handle closed_with_error = GRPC_ERROR_NONE
 
grpc_core::Combinercombiner
 
grpc_chttp2_deframe_transport_state deframe_state = GRPC_DTS_CLIENT_PREFIX_0
 
uint8_t destroying = false
 
grpc_closure destructive_reclaimer_locked
 
bool destructive_reclaimer_registered = false
 
bool dirtied_local_settings = true
 
uint8_t endpoint_reading = 1
 
grpc_endpointep
 
uint32_t expect_continuation_stream_id = 0
 
grpc_closure finish_bdp_ping_locked
 
grpc_closure finish_keepalive_ping_locked
 
grpc_core::chttp2::TransportFlowControl flow_control
 
uint32_t force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
 
grpc_error_handle goaway_error = GRPC_ERROR_NONE
 
grpc_chttp2_goaway_parser goaway_parser
 
bool have_next_bdp_ping_timer = false
 
uint8_t header_eof = 0
 
grpc_core::HPackCompressor hpack_compressor
 
grpc_core::HPackParser hpack_parser
 
uint8_t incoming_frame_flags = 0
 
uint32_t incoming_frame_size = 0
 
uint8_t incoming_frame_type = 0
 
grpc_chttp2_streamincoming_stream = nullptr
 
uint32_t incoming_stream_id = 0
 
grpc_closure init_keepalive_ping_locked
 
int64_t initial_window_update = 0
 
bool is_client
 
bool is_first_frame = true
 
bool keepalive_permit_without_calls = false
 
bool keepalive_ping_started = false
 
grpc_timer keepalive_ping_timer
 
grpc_chttp2_keepalive_state keepalive_state
 
grpc_core::Duration keepalive_time
 
grpc_core::Duration keepalive_timeout
 
grpc_closure keepalive_watchdog_fired_locked
 
grpc_timer keepalive_watchdog_timer
 
uint32_t last_new_stream_id = 0
 
grpc_chttp2_stream_list lists [STREAM_LIST_COUNT] = {}
 
grpc_core::MemoryOwner memory_owner
 
grpc_timer next_bdp_ping_timer
 
grpc_closure next_bdp_ping_timer_expired_locked
 
uint32_t next_stream_id = 0
 
grpc_closurenotify_on_close = nullptr
 
grpc_closurenotify_on_receive_settings = nullptr
 
uint32_t num_messages_in_next_write = 0
 
uint32_t num_pending_induced_frames = 0
 
grpc_slice_buffer outbuf
 
grpc_error_handle(* parser )(void *parser_user_data, grpc_chttp2_transport *t, grpc_chttp2_stream *s, const grpc_slice &slice, int is_last)
 
void * parser_data = nullptr
 
std::string peer_string
 
size_t ping_ack_capacity = 0
 
size_t ping_ack_count = 0
 
uint64_tping_acks = nullptr
 
uint64_t ping_ctr = 0
 
grpc_chttp2_repeated_ping_policy ping_policy
 
grpc_chttp2_ping_queue ping_queue = grpc_chttp2_ping_queue()
 
grpc_chttp2_server_ping_recv_state ping_recv_state
 
grpc_chttp2_repeated_ping_state ping_state
 
grpc_slice_buffer qbuf
 
grpc_closure read_action_locked
 
grpc_slice_buffer read_buffer
 
bool reading_paused_on_pending_induced_frames = false
 
grpc_core::RefCount refs
 
grpc_closure retry_initiate_ping_locked
 
grpc_closure_list run_after_write = GRPC_CLOSURE_LIST_INIT
 
const grpc_core::MemoryAllocator::Reservation self_reservation
 
grpc_chttp2_sent_goaway_state sent_goaway_state = GRPC_CHTTP2_NO_GOAWAY_SEND
 
bool sent_local_settings = false
 
uint32_t settings [GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]
 
union {
   grpc_chttp2_ping_parser   ping
 
   grpc_chttp2_rst_stream_parser   rst_stream
 
   grpc_chttp2_settings_parser   settings
 
   grpc_chttp2_window_update_parser   window_update
 
simple
 
grpc_closure start_bdp_ping_locked
 
grpc_closure start_keepalive_ping_locked
 
grpc_core::ConnectivityStateTracker state_tracker
 
grpc_chttp2_stream_map stream_map
 
grpc_closure write_action
 
grpc_closure write_action_begin_locked
 
grpc_closure write_action_end_locked
 
uint32_t write_buffer_size = grpc_core::chttp2::kDefaultWindow
 
grpc_chttp2_write_cbwrite_cb_pool = nullptr
 
grpc_chttp2_write_state write_state = GRPC_CHTTP2_WRITE_STATE_IDLE
 

Detailed Description

Definition at line 238 of file src/core/ext/transport/chttp2/transport/internal.h.

Constructor & Destructor Documentation

◆ grpc_chttp2_transport()

grpc_chttp2_transport::grpc_chttp2_transport ( const grpc_channel_args channel_args,
grpc_endpoint ep,
bool  is_client 
)

Definition at line 483 of file chttp2_transport.cc.

◆ ~grpc_chttp2_transport()

grpc_chttp2_transport::~grpc_chttp2_transport ( )

Definition at line 233 of file chttp2_transport.cc.

Member Data Documentation

◆ accept_stream_cb

void(* grpc_chttp2_transport::accept_stream_cb) (void *user_data, grpc_transport *transport, const void *server_data)

◆ accept_stream_cb_user_data

void* grpc_chttp2_transport::accept_stream_cb_user_data

◆ accepting_stream

grpc_chttp2_stream** grpc_chttp2_transport::accepting_stream = nullptr

address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to publish the accepted server stream

Definition at line 286 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ active_reclamation

grpc_core::ReclamationSweep grpc_chttp2_transport::active_reclamation

◆ base

grpc_transport grpc_chttp2_transport::base

◆ bdp_ping_blocked

bool grpc_chttp2_transport::bdp_ping_blocked
Initial value:
=
false

Definition at line 385 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ bdp_ping_started

bool grpc_chttp2_transport::bdp_ping_started = false

If start_bdp_ping_locked has been called

Definition at line 411 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ benign_reclaimer_locked

grpc_closure grpc_chttp2_transport::benign_reclaimer_locked

benign cleanup closure

Definition at line 404 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ benign_reclaimer_registered

bool grpc_chttp2_transport::benign_reclaimer_registered = false

have we scheduled a benign cleanup?

Definition at line 400 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ channelz_socket

grpc_core::RefCountedPtr<grpc_core::channelz::SocketNode> grpc_chttp2_transport::channelz_socket

◆ cl

grpc_core::ContextList* grpc_chttp2_transport::cl = nullptr

◆ close_transport_on_writes_finished

grpc_error_handle grpc_chttp2_transport::close_transport_on_writes_finished = GRPC_ERROR_NONE

◆ closed_with_error

grpc_error_handle grpc_chttp2_transport::closed_with_error = GRPC_ERROR_NONE

has the upper layer closed the transport?

Definition at line 263 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ combiner

grpc_core::Combiner* grpc_chttp2_transport::combiner

◆ deframe_state

grpc_chttp2_deframe_transport_state grpc_chttp2_transport::deframe_state = GRPC_DTS_CLIENT_PREFIX_0

◆ destroying

uint8_t grpc_chttp2_transport::destroying = false

is the transport destroying itself?

Definition at line 261 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ destructive_reclaimer_locked

grpc_closure grpc_chttp2_transport::destructive_reclaimer_locked

destructive cleanup closure

Definition at line 406 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ destructive_reclaimer_registered

bool grpc_chttp2_transport::destructive_reclaimer_registered = false

have we scheduled a destructive cleanup?

Definition at line 402 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ dirtied_local_settings

bool grpc_chttp2_transport::dirtied_local_settings = true

are the local settings dirty and need to be sent?

Definition at line 317 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ endpoint_reading

uint8_t grpc_chttp2_transport::endpoint_reading = 1

is there a read request to the endpoint outstanding?

Definition at line 266 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ ep

grpc_endpoint* grpc_chttp2_transport::ep

◆ expect_continuation_stream_id

uint32_t grpc_chttp2_transport::expect_continuation_stream_id = 0

◆ finish_bdp_ping_locked

grpc_closure grpc_chttp2_transport::finish_bdp_ping_locked

◆ finish_keepalive_ping_locked

grpc_closure grpc_chttp2_transport::finish_keepalive_ping_locked

Cousure to run when the keepalive ping ack is received

Definition at line 420 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ flow_control

grpc_core::chttp2::TransportFlowControl grpc_chttp2_transport::flow_control

◆ force_send_settings

uint32_t grpc_chttp2_transport::force_send_settings = 1 << GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE

bitmask of setting indexes to send out Hack: it's common for implementations to assume 65536 bytes initial send window – this should by rights be 0

Definition at line 323 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ goaway_error

grpc_error_handle grpc_chttp2_transport::goaway_error = GRPC_ERROR_NONE

Set to a grpc_error object if a goaway frame is received. By default, set to GRPC_ERROR_NONE

Definition at line 312 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ goaway_parser

grpc_chttp2_goaway_parser grpc_chttp2_transport::goaway_parser

parser for goaway frames

Definition at line 357 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ have_next_bdp_ping_timer

bool grpc_chttp2_transport::have_next_bdp_ping_timer = false

◆ header_eof

uint8_t grpc_chttp2_transport::header_eof = 0

◆ hpack_compressor

grpc_core::HPackCompressor grpc_chttp2_transport::hpack_compressor

hpack encoding

Definition at line 299 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ hpack_parser

grpc_core::HPackParser grpc_chttp2_transport::hpack_parser

parser for headers

Definition at line 348 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ incoming_frame_flags

uint8_t grpc_chttp2_transport::incoming_frame_flags = 0

◆ incoming_frame_size

uint32_t grpc_chttp2_transport::incoming_frame_size = 0

◆ incoming_frame_type

uint8_t grpc_chttp2_transport::incoming_frame_type = 0

◆ incoming_stream

grpc_chttp2_stream* grpc_chttp2_transport::incoming_stream = nullptr

◆ incoming_stream_id

uint32_t grpc_chttp2_transport::incoming_stream_id = 0

◆ init_keepalive_ping_locked

grpc_closure grpc_chttp2_transport::init_keepalive_ping_locked

Closure to initialize a keepalive ping

Definition at line 416 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ initial_window_update

int64_t grpc_chttp2_transport::initial_window_update = 0

initial window change. This is tracked as we parse settings frames from the remote peer. If there is a positive delta, then we will make all streams readable since they may have become unstalled

Definition at line 363 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ is_client

bool grpc_chttp2_transport::is_client

is this a client?

Definition at line 301 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ is_first_frame

bool grpc_chttp2_transport::is_first_frame = true

◆ keepalive_permit_without_calls

bool grpc_chttp2_transport::keepalive_permit_without_calls = false

if keepalive pings are allowed when there's no outstanding streams

Definition at line 432 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_ping_started

bool grpc_chttp2_transport::keepalive_ping_started = false

If start_keepalive_ping_locked has been called

Definition at line 434 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_ping_timer

grpc_timer grpc_chttp2_transport::keepalive_ping_timer

timer to initiate ping events

Definition at line 424 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_state

grpc_chttp2_keepalive_state grpc_chttp2_transport::keepalive_state

keep-alive state machine state

Definition at line 436 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_time

grpc_core::Duration grpc_chttp2_transport::keepalive_time

time duration in between pings

Definition at line 428 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_timeout

grpc_core::Duration grpc_chttp2_transport::keepalive_timeout

grace period for a ping to complete before watchdog kicks in

Definition at line 430 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_watchdog_fired_locked

grpc_closure grpc_chttp2_transport::keepalive_watchdog_fired_locked

Closrue to run when the keepalive ping timeouts

Definition at line 422 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ keepalive_watchdog_timer

grpc_timer grpc_chttp2_transport::keepalive_watchdog_timer

watchdog to kill the transport when waiting for the keepalive ping

Definition at line 426 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ last_new_stream_id

uint32_t grpc_chttp2_transport::last_new_stream_id = 0

last new stream id

Definition at line 332 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ lists

grpc_chttp2_stream_list grpc_chttp2_transport::lists[STREAM_LIST_COUNT] = {}

various lists of streams

Definition at line 269 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ memory_owner

grpc_core::MemoryOwner grpc_chttp2_transport::memory_owner

◆ next_bdp_ping_timer

grpc_timer grpc_chttp2_transport::next_bdp_ping_timer

◆ next_bdp_ping_timer_expired_locked

grpc_closure grpc_chttp2_transport::next_bdp_ping_timer_expired_locked

◆ next_stream_id

uint32_t grpc_chttp2_transport::next_stream_id = 0

what is the next stream id to be allocated by this peer? copied to next_stream_id in parsing when parsing commences

Definition at line 329 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ notify_on_close

grpc_closure* grpc_chttp2_transport::notify_on_close = nullptr

◆ notify_on_receive_settings

grpc_closure* grpc_chttp2_transport::notify_on_receive_settings = nullptr

◆ num_messages_in_next_write

uint32_t grpc_chttp2_transport::num_messages_in_next_write = 0

◆ num_pending_induced_frames

uint32_t grpc_chttp2_transport::num_pending_induced_frames = 0

The number of pending induced frames (SETTINGS_ACK, PINGS_ACK and RST_STREAM) in the outgoing buffer (t->qbuf). If this number goes beyond DEFAULT_MAX_PENDING_INDUCED_FRAMES, we pause reading new frames. We would only continue reading when we are able to write to the socket again, thereby reducing the number of induced frames.

Definition at line 445 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ outbuf

grpc_slice_buffer grpc_chttp2_transport::outbuf

data to write now

Definition at line 297 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ parser

grpc_error_handle(* grpc_chttp2_transport::parser) (void *parser_user_data, grpc_chttp2_transport *t, grpc_chttp2_stream *s, const grpc_slice &slice, int is_last)

◆ parser_data

void* grpc_chttp2_transport::parser_data = nullptr

◆ peer_string

std::string grpc_chttp2_transport::peer_string

◆ ping

grpc_chttp2_ping_parser grpc_chttp2_transport::ping

◆ ping_ack_capacity

size_t grpc_chttp2_transport::ping_ack_capacity = 0

◆ ping_ack_count

size_t grpc_chttp2_transport::ping_ack_count = 0

ping acks

Definition at line 342 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ ping_acks

uint64_t* grpc_chttp2_transport::ping_acks = nullptr

◆ ping_ctr

uint64_t grpc_chttp2_transport::ping_ctr = 0

◆ ping_policy

grpc_chttp2_repeated_ping_policy grpc_chttp2_transport::ping_policy

◆ ping_queue

grpc_chttp2_ping_queue grpc_chttp2_transport::ping_queue = grpc_chttp2_ping_queue()

ping queues for various ping insertion points

Definition at line 335 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ ping_recv_state

grpc_chttp2_server_ping_recv_state grpc_chttp2_transport::ping_recv_state

◆ ping_state

grpc_chttp2_repeated_ping_state grpc_chttp2_transport::ping_state

◆ qbuf

grpc_slice_buffer grpc_chttp2_transport::qbuf

data to write next write

Definition at line 304 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ read_action_locked

grpc_closure grpc_chttp2_transport::read_action_locked

◆ read_buffer

grpc_slice_buffer grpc_chttp2_transport::read_buffer

incoming read bytes

Definition at line 281 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ reading_paused_on_pending_induced_frames

bool grpc_chttp2_transport::reading_paused_on_pending_induced_frames = false

◆ refs

grpc_core::RefCount grpc_chttp2_transport::refs

◆ retry_initiate_ping_locked

grpc_closure grpc_chttp2_transport::retry_initiate_ping_locked

◆ rst_stream

grpc_chttp2_rst_stream_parser grpc_chttp2_transport::rst_stream

◆ run_after_write

grpc_closure_list grpc_chttp2_transport::run_after_write = GRPC_CLOSURE_LIST_INIT

◆ self_reservation

const grpc_core::MemoryAllocator::Reservation grpc_chttp2_transport::self_reservation

◆ sent_goaway_state

grpc_chttp2_sent_goaway_state grpc_chttp2_transport::sent_goaway_state = GRPC_CHTTP2_NO_GOAWAY_SEND

◆ sent_local_settings

bool grpc_chttp2_transport::sent_local_settings = false

have local settings been sent?

Definition at line 319 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ settings [1/2]

grpc_chttp2_settings_parser grpc_chttp2_transport::settings

◆ settings [2/2]

uint32_t grpc_chttp2_transport::settings[GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]

settings values

Definition at line 325 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ simple

union { ... } grpc_chttp2_transport::simple

simple one shot parsers

◆ start_bdp_ping_locked

grpc_closure grpc_chttp2_transport::start_bdp_ping_locked

◆ start_keepalive_ping_locked

grpc_closure grpc_chttp2_transport::start_keepalive_ping_locked

Closure to run when the keepalive ping is sent

Definition at line 418 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ state_tracker

grpc_core::ConnectivityStateTracker grpc_chttp2_transport::state_tracker

connectivity tracking

Definition at line 294 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ stream_map

grpc_chttp2_stream_map grpc_chttp2_transport::stream_map

maps stream id to grpc_chttp2_stream objects

Definition at line 272 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ window_update

grpc_chttp2_window_update_parser grpc_chttp2_transport::window_update

◆ write_action

grpc_closure grpc_chttp2_transport::write_action

◆ write_action_begin_locked

grpc_closure grpc_chttp2_transport::write_action_begin_locked

◆ write_action_end_locked

grpc_closure grpc_chttp2_transport::write_action_end_locked

◆ write_buffer_size

uint32_t grpc_chttp2_transport::write_buffer_size = grpc_core::chttp2::kDefaultWindow

how much data are we willing to buffer when the WRITE_BUFFER_HINT is set?

Definition at line 308 of file src/core/ext/transport/chttp2/transport/internal.h.

◆ write_cb_pool

grpc_chttp2_write_cb* grpc_chttp2_transport::write_cb_pool = nullptr

◆ write_state

grpc_chttp2_write_state grpc_chttp2_transport::write_state = GRPC_CHTTP2_WRITE_STATE_IDLE

write execution state of the transport

Definition at line 258 of file src/core/ext/transport/chttp2/transport/internal.h.


The documentation for this struct was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:46