GRPC Core  9.0.0
Public Member Functions | Data Fields
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_resource_user *resource_user)
 
 ~grpc_chttp2_transport ()
 

Data Fields

grpc_transport base
 
grpc_core::RefCount refs
 
grpc_endpointep
 
char * peer_string
 
grpc_resource_userresource_user
 
grpc_core::Combinercombiner
 
grpc_closurenotify_on_receive_settings = nullptr
 
grpc_chttp2_write_state write_state = GRPC_CHTTP2_WRITE_STATE_IDLE
 write execution state of the transport More...
 
uint8_t destroying = false
 is the transport destroying itself? More...
 
grpc_errorclosed_with_error = GRPC_ERROR_NONE
 has the upper layer closed the transport? More...
 
uint8_t endpoint_reading = 1
 is there a read request to the endpoint outstanding? More...
 
grpc_chttp2_stream_list lists [STREAM_LIST_COUNT] = {}
 various lists of streams More...
 
grpc_chttp2_stream_map stream_map
 maps stream id to grpc_chttp2_stream objects More...
 
grpc_closure write_action_begin_locked
 
grpc_closure write_action
 
grpc_closure write_action_end_locked
 
grpc_closure read_action_locked
 
grpc_slice_buffer read_buffer
 incoming read bytes More...
 
grpc_chttp2_stream ** 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 More...
 
void(* accept_stream_cb )(void *user_data, grpc_transport *transport, const void *server_data)
 
void * accept_stream_cb_user_data
 
grpc_core::ConnectivityStateTracker state_tracker
 connectivity tracking More...
 
grpc_slice_buffer outbuf
 data to write now More...
 
grpc_chttp2_hpack_compressor hpack_compressor
 hpack encoding More...
 
bool is_client
 is this a client? More...
 
grpc_slice_buffer qbuf
 data to write next write More...
 
uint32_t write_buffer_size = grpc_core::chttp2::kDefaultWindow
 how much data are we willing to buffer when the WRITE_BUFFER_HINT is set? More...
 
grpc_errorgoaway_error = GRPC_ERROR_NONE
 Set to a grpc_error object if a goaway frame is received. More...
 
grpc_chttp2_sent_goaway_state sent_goaway_state = GRPC_CHTTP2_NO_GOAWAY_SEND
 
bool dirtied_local_settings = true
 are the local settings dirty and need to be sent? More...
 
bool sent_local_settings = false
 have local settings been sent? More...
 
uint32_t 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 More...
 
uint32_t settings [GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]
 settings values More...
 
uint32_t 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 More...
 
uint32_t last_new_stream_id = 0
 last new stream id More...
 
grpc_chttp2_ping_queue ping_queue = grpc_chttp2_ping_queue()
 ping queues for various ping insertion points More...
 
grpc_chttp2_repeated_ping_policy ping_policy
 
grpc_chttp2_repeated_ping_state ping_state
 
uint64_t ping_ctr = 0
 
grpc_closure retry_initiate_ping_locked
 
size_t ping_ack_count = 0
 ping acks More...
 
size_t ping_ack_capacity = 0
 
uint64_t * ping_acks = nullptr
 
grpc_chttp2_server_ping_recv_state ping_recv_state
 
grpc_chttp2_hpack_parser hpack_parser
 parser for headers More...
 
union {
   grpc_chttp2_window_update_parser   window_update
 
   grpc_chttp2_settings_parser   settings
 
   grpc_chttp2_ping_parser   ping
 
   grpc_chttp2_rst_stream_parser   rst_stream
 
simple
 simple one shot parsers More...
 
grpc_chttp2_goaway_parser goaway_parser
 parser for goaway frames More...
 
grpc_core::PolymorphicManualConstructor< grpc_core::chttp2::TransportFlowControlBase, grpc_core::chttp2::TransportFlowControl, grpc_core::chttp2::TransportFlowControlDisabledflow_control
 
int64_t initial_window_update = 0
 initial window change. More...
 
grpc_chttp2_deframe_transport_state deframe_state = GRPC_DTS_CLIENT_PREFIX_0
 
uint8_t incoming_frame_type = 0
 
uint8_t incoming_frame_flags = 0
 
uint8_t header_eof = 0
 
bool is_first_frame = true
 
uint32_t expect_continuation_stream_id = 0
 
uint32_t incoming_frame_size = 0
 
uint32_t incoming_stream_id = 0
 
void * parser_data = nullptr
 
grpc_chttp2_streamincoming_stream = nullptr
 
grpc_error *(* parser )(void *parser_user_data, grpc_chttp2_transport *t, grpc_chttp2_stream *s, const grpc_slice &slice, int is_last)
 
grpc_chttp2_write_cbwrite_cb_pool = nullptr
 
grpc_closure next_bdp_ping_timer_expired_locked
 
grpc_closure start_bdp_ping_locked
 
grpc_closure finish_bdp_ping_locked
 
grpc_errorclose_transport_on_writes_finished = GRPC_ERROR_NONE
 
grpc_closure_list run_after_write = GRPC_CLOSURE_LIST_INIT
 
bool benign_reclaimer_registered = false
 have we scheduled a benign cleanup? More...
 
bool destructive_reclaimer_registered = false
 have we scheduled a destructive cleanup? More...
 
grpc_closure benign_reclaimer_locked
 benign cleanup closure More...
 
grpc_closure destructive_reclaimer_locked
 destructive cleanup closure More...
 
bool have_next_bdp_ping_timer = false
 
bool bdp_ping_started = false
 If start_bdp_ping_locked has been called. More...
 
grpc_timer next_bdp_ping_timer
 
grpc_closure init_keepalive_ping_locked
 Closure to initialize a keepalive ping. More...
 
grpc_closure start_keepalive_ping_locked
 Closure to run when the keepalive ping is sent. More...
 
grpc_closure finish_keepalive_ping_locked
 Cousure to run when the keepalive ping ack is received. More...
 
grpc_closure keepalive_watchdog_fired_locked
 Closrue to run when the keepalive ping timeouts. More...
 
grpc_timer keepalive_ping_timer
 timer to initiate ping events More...
 
grpc_timer keepalive_watchdog_timer
 watchdog to kill the transport when waiting for the keepalive ping More...
 
grpc_millis keepalive_time
 time duration in between pings More...
 
grpc_millis keepalive_timeout
 grace period for a ping to complete before watchdog kicks in More...
 
bool keepalive_permit_without_calls = false
 if keepalive pings are allowed when there's no outstanding streams More...
 
bool keepalive_ping_started = false
 If start_keepalive_ping_locked has been called. More...
 
grpc_chttp2_keepalive_state keepalive_state
 keep-alive state machine state More...
 
grpc_core::ContextListcl = nullptr
 
grpc_core::RefCountedPtr< grpc_core::channelz::SocketNodechannelz_socket
 
uint32_t num_messages_in_next_write = 0
 
uint32_t num_pending_induced_frames = 0
 The number of pending induced frames (SETTINGS_ACK, PINGS_ACK and RST_STREAM) in the outgoing buffer (t->qbuf). More...
 
bool reading_paused_on_pending_induced_frames = false
 

Constructor & Destructor Documentation

◆ 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 
)

◆ ~grpc_chttp2_transport()

grpc_chttp2_transport::~grpc_chttp2_transport ( )

Field 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

◆ base

grpc_transport grpc_chttp2_transport::base

◆ bdp_ping_started

bool grpc_chttp2_transport::bdp_ping_started = false

If start_bdp_ping_locked has been called.

◆ benign_reclaimer_locked

grpc_closure grpc_chttp2_transport::benign_reclaimer_locked

benign cleanup closure

◆ benign_reclaimer_registered

bool grpc_chttp2_transport::benign_reclaimer_registered = false

have we scheduled a benign cleanup?

◆ 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* grpc_chttp2_transport::close_transport_on_writes_finished = GRPC_ERROR_NONE

◆ closed_with_error

grpc_error* grpc_chttp2_transport::closed_with_error = GRPC_ERROR_NONE

has the upper layer closed the transport?

◆ 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?

◆ destructive_reclaimer_locked

grpc_closure grpc_chttp2_transport::destructive_reclaimer_locked

destructive cleanup closure

◆ destructive_reclaimer_registered

bool grpc_chttp2_transport::destructive_reclaimer_registered = false

have we scheduled a destructive cleanup?

◆ dirtied_local_settings

bool grpc_chttp2_transport::dirtied_local_settings = true

are the local settings dirty and need to be sent?

◆ endpoint_reading

uint8_t grpc_chttp2_transport::endpoint_reading = 1

is there a read request to the endpoint outstanding?

◆ 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.

◆ 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

◆ goaway_error

grpc_error* 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

◆ goaway_parser

grpc_chttp2_goaway_parser grpc_chttp2_transport::goaway_parser

parser for goaway frames

◆ 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_chttp2_hpack_compressor grpc_chttp2_transport::hpack_compressor

hpack encoding

◆ hpack_parser

grpc_chttp2_hpack_parser grpc_chttp2_transport::hpack_parser

parser for headers

◆ 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.

◆ 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

◆ is_client

bool grpc_chttp2_transport::is_client

is this a client?

◆ 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

◆ keepalive_ping_started

bool grpc_chttp2_transport::keepalive_ping_started = false

If start_keepalive_ping_locked has been called.

◆ keepalive_ping_timer

grpc_timer grpc_chttp2_transport::keepalive_ping_timer

timer to initiate ping events

◆ keepalive_state

grpc_chttp2_keepalive_state grpc_chttp2_transport::keepalive_state

keep-alive state machine state

◆ keepalive_time

grpc_millis grpc_chttp2_transport::keepalive_time

time duration in between pings

◆ keepalive_timeout

grpc_millis grpc_chttp2_transport::keepalive_timeout

grace period for a ping to complete before watchdog kicks in

◆ keepalive_watchdog_fired_locked

grpc_closure grpc_chttp2_transport::keepalive_watchdog_fired_locked

Closrue to run when the keepalive ping timeouts.

◆ keepalive_watchdog_timer

grpc_timer grpc_chttp2_transport::keepalive_watchdog_timer

watchdog to kill the transport when waiting for the keepalive ping

◆ last_new_stream_id

uint32_t grpc_chttp2_transport::last_new_stream_id = 0

last new stream id

◆ lists

grpc_chttp2_stream_list grpc_chttp2_transport::lists[STREAM_LIST_COUNT] = {}

various lists of streams

◆ 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

◆ 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.

◆ outbuf

grpc_slice_buffer grpc_chttp2_transport::outbuf

data to write now

◆ parser

grpc_error*(* 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

char* 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

◆ 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

◆ 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

◆ read_action_locked

grpc_closure grpc_chttp2_transport::read_action_locked

◆ read_buffer

grpc_slice_buffer grpc_chttp2_transport::read_buffer

incoming read bytes

◆ 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

◆ resource_user

grpc_resource_user* grpc_chttp2_transport::resource_user

◆ 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

◆ 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?

◆ settings [1/2]

uint32_t grpc_chttp2_transport::settings[GRPC_NUM_SETTING_SETS][GRPC_CHTTP2_NUM_SETTINGS]

settings values

◆ settings [2/2]

grpc_chttp2_settings_parser grpc_chttp2_transport::settings

◆ 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.

◆ state_tracker

grpc_core::ConnectivityStateTracker grpc_chttp2_transport::state_tracker

connectivity tracking

◆ stream_map

grpc_chttp2_stream_map grpc_chttp2_transport::stream_map

maps stream id to grpc_chttp2_stream objects

◆ 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?

◆ 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


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