MCPcopy Create free account
hub / github.com/apache/httpd / enter_ping_state

Function enter_ping_state

modules/http2/h2_proxy_session.c:122–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static void enter_ping_state(h2_proxy_session *session, h2_ping_state_t state)
123{
124 if (session->ping_state == state) return;
125 switch (session->ping_state) {
126 case H2_PING_ST_NONE:
127 /* leaving NONE, enforce timeout, send frame maybe */
128 if (H2_PING_ST_AWAIT_PING == state) {
129 unset_ping_timeout(session);
130 nghttp2_submit_ping(session->ngh2, 0, (const uint8_t *)"nevergonnagiveyouup");
131 }
132 set_ping_timeout(session);
133 session->ping_state = state;
134 break;
135 default:
136 /* no switching between the != NONE states */
137 if (H2_PING_ST_NONE == state) {
138 session->ping_state = state;
139 unset_ping_timeout(session);
140 ping_arrived(session);
141 }
142 break;
143 }
144}
145
146static void ping_new_session(h2_proxy_session *session, proxy_conn_rec *p_conn)
147{

Callers 3

ping_new_sessionFunction · 0.85
ping_reuse_sessionFunction · 0.85
ping_ev_frame_receivedFunction · 0.85

Calls 3

unset_ping_timeoutFunction · 0.85
set_ping_timeoutFunction · 0.85
ping_arrivedFunction · 0.85

Tested by

no test coverage detected