Lines Matching refs:frame

485 static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
488 static int on_frame_send(nghttp2_session *session, const nghttp2_frame *frame,
497 const nghttp2_frame *frame, void *userp);
498 static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
821 const nghttp2_push_promise *frame; member
949 const nghttp2_push_promise *frame) in push_promise() argument
955 frame->promised_stream_id); in push_promise()
983 heads.frame = frame; in push_promise()
1017 newstream->id = frame->promised_stream_id; in push_promise()
1095 const nghttp2_frame *frame) in on_stream_frame() argument
1099 int32_t stream_id = frame->hd.stream_id; in on_stream_frame()
1107 switch(frame->hd.type) { in on_stream_frame()
1152 rv = push_promise(cf, data, &frame->push_promise); in on_stream_frame()
1156 frame->push_promise.promised_stream_id, in on_stream_frame()
1169 if(frame->rst_stream.error_code) { in on_stream_frame()
1190 if(frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { in on_stream_frame()
1209 static int fr_print(const nghttp2_frame *frame, char *buffer, size_t blen) in fr_print() argument
1211 switch(frame->hd.type) { in fr_print()
1215 (int)frame->hd.length, in fr_print()
1216 !!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM), in fr_print()
1217 (int)frame->data.padlen); in fr_print()
1222 (int)frame->hd.length, in fr_print()
1223 !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS), in fr_print()
1224 !!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM)); in fr_print()
1229 (int)frame->hd.length, frame->hd.flags); in fr_print()
1234 (int)frame->hd.length, frame->hd.flags, in fr_print()
1235 frame->rst_stream.error_code); in fr_print()
1238 if(frame->hd.flags & NGHTTP2_FLAG_ACK) { in fr_print()
1242 "FRAME[SETTINGS, len=%d]", (int)frame->hd.length); in fr_print()
1247 (int)frame->hd.length, in fr_print()
1248 !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS)); in fr_print()
1253 (int)frame->hd.length, in fr_print()
1254 frame->hd.flags&NGHTTP2_FLAG_ACK); in fr_print()
1259 size_t len = (frame->goaway.opaque_data_len < s_len) ? in fr_print()
1260 frame->goaway.opaque_data_len : s_len-1; in fr_print()
1262 memcpy(scratch, frame->goaway.opaque_data, len); in fr_print()
1265 "last_stream=%d]", frame->goaway.error_code, in fr_print()
1266 scratch, frame->goaway.last_stream_id); in fr_print()
1271 frame->window_update.window_size_increment); in fr_print()
1275 frame->hd.type, (int)frame->hd.length, in fr_print()
1276 frame->hd.flags); in fr_print()
1280 static int on_frame_send(nghttp2_session *session, const nghttp2_frame *frame, in on_frame_send() argument
1291 len = fr_print(frame, buffer, sizeof(buffer)-1); in on_frame_send()
1293 CURL_TRC_CF(data, cf, "[%d] -> %s", frame->hd.stream_id, buffer); in on_frame_send()
1299 static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, in on_frame_recv() argument
1305 int32_t stream_id = frame->hd.stream_id; in on_frame_recv()
1312 len = fr_print(frame, buffer, sizeof(buffer)-1); in on_frame_recv()
1314 CURL_TRC_CF(data, cf, "[%d] <- %s",frame->hd.stream_id, buffer); in on_frame_recv()
1321 switch(frame->hd.type) { in on_frame_recv()
1323 if(!(frame->hd.flags & NGHTTP2_FLAG_ACK)) { in on_frame_recv()
1354 ctx->goaway_error = frame->goaway.error_code; in on_frame_recv()
1355 ctx->remote_max_sid = frame->goaway.last_stream_id; in on_frame_recv()
1374 return on_stream_frame(cf, data_s, frame) ? NGHTTP2_ERR_CALLBACK_FAILURE : 0; in on_frame_recv()
1473 const nghttp2_frame *frame, void *userp) in on_begin_headers() argument
1481 data_s = nghttp2_session_get_stream_user_data(session, frame->hd.stream_id); in on_begin_headers()
1486 if(frame->hd.type != NGHTTP2_HEADERS) { in on_begin_headers()
1499 static int on_header(nghttp2_session *session, const nghttp2_frame *frame, in on_header() argument
1509 int32_t stream_id = frame->hd.stream_id; in on_header()
1530 if(frame->hd.type == NGHTTP2_PUSH_PROMISE) { in on_header()