• Home
  • Raw
  • Download

Lines Matching refs:session

46 static int detect_self_dependency(nghttp2_session *session, int32_t stream_id,  in detect_self_dependency()  argument
51 if ((int32_t)session->next_stream_id == pri_spec->stream_id) { in detect_self_dependency()
67 static int32_t submit_headers_shared(nghttp2_session *session, uint8_t flags, in submit_headers_shared() argument
80 mem = &session->mem; in submit_headers_shared()
101 if (session->next_stream_id > INT32_MAX) { in submit_headers_shared()
106 stream_id = (int32_t)session->next_stream_id; in submit_headers_shared()
107 session->next_stream_id += 2; in submit_headers_shared()
120 rv = nghttp2_session_add_item(session, item); in submit_headers_shared()
142 static int32_t submit_headers_shared_nva(nghttp2_session *session, in submit_headers_shared_nva() argument
153 mem = &session->mem; in submit_headers_shared_nva()
167 return submit_headers_shared(session, flags, stream_id, &copy_pri_spec, in submit_headers_shared_nva()
171 int nghttp2_submit_trailer(nghttp2_session *session, int32_t stream_id, in nghttp2_submit_trailer() argument
177 return (int)submit_headers_shared_nva(session, NGHTTP2_FLAG_END_STREAM, in nghttp2_submit_trailer()
182 int32_t nghttp2_submit_headers(nghttp2_session *session, uint8_t flags, in nghttp2_submit_headers() argument
190 if (session->server) { in nghttp2_submit_headers()
200 rv = detect_self_dependency(session, stream_id, pri_spec); in nghttp2_submit_headers()
210 return submit_headers_shared_nva(session, flags, stream_id, pri_spec, nva, in nghttp2_submit_headers()
214 int nghttp2_submit_ping(nghttp2_session *session, uint8_t flags, in nghttp2_submit_ping() argument
217 return nghttp2_session_add_ping(session, flags, opaque_data); in nghttp2_submit_ping()
220 int nghttp2_submit_priority(nghttp2_session *session, uint8_t flags, in nghttp2_submit_priority() argument
230 mem = &session->mem; in nghttp2_submit_priority()
256 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_priority()
268 int nghttp2_submit_rst_stream(nghttp2_session *session, uint8_t flags, in nghttp2_submit_rst_stream() argument
276 return nghttp2_session_add_rst_stream(session, stream_id, error_code); in nghttp2_submit_rst_stream()
279 int nghttp2_submit_goaway(nghttp2_session *session, uint8_t flags, in nghttp2_submit_goaway() argument
284 if (session->goaway_flags & NGHTTP2_GOAWAY_TERM_ON_SEND) { in nghttp2_submit_goaway()
287 return nghttp2_session_add_goaway(session, last_stream_id, error_code, in nghttp2_submit_goaway()
292 int nghttp2_submit_shutdown_notice(nghttp2_session *session) { in nghttp2_submit_shutdown_notice() argument
293 if (!session->server) { in nghttp2_submit_shutdown_notice()
296 if (session->goaway_flags) { in nghttp2_submit_shutdown_notice()
299 return nghttp2_session_add_goaway(session, (1u << 31) - 1, NGHTTP2_NO_ERROR, in nghttp2_submit_shutdown_notice()
304 int nghttp2_submit_settings(nghttp2_session *session, uint8_t flags, in nghttp2_submit_settings() argument
307 return nghttp2_session_add_settings(session, NGHTTP2_FLAG_NONE, iv, niv); in nghttp2_submit_settings()
310 int32_t nghttp2_submit_push_promise(nghttp2_session *session, uint8_t flags, in nghttp2_submit_push_promise() argument
323 mem = &session->mem; in nghttp2_submit_push_promise()
325 if (stream_id <= 0 || nghttp2_session_is_my_stream_id(session, stream_id)) { in nghttp2_submit_push_promise()
329 if (!session->server) { in nghttp2_submit_push_promise()
334 if (session->next_stream_id > INT32_MAX) { in nghttp2_submit_push_promise()
357 promised_stream_id = (int32_t)session->next_stream_id; in nghttp2_submit_push_promise()
358 session->next_stream_id += 2; in nghttp2_submit_push_promise()
363 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_push_promise()
375 int nghttp2_submit_window_update(nghttp2_session *session, uint8_t flags, in nghttp2_submit_window_update() argument
387 &session->local_window_size, &session->recv_window_size, in nghttp2_submit_window_update()
388 &session->recv_reduction, &window_size_increment); in nghttp2_submit_window_update()
393 stream = nghttp2_session_get_stream(session, stream_id); in nghttp2_submit_window_update()
408 session->consumed_size = in nghttp2_submit_window_update()
409 nghttp2_max(0, session->consumed_size - window_size_increment); in nghttp2_submit_window_update()
415 return nghttp2_session_add_window_update(session, 0, stream_id, in nghttp2_submit_window_update()
421 int nghttp2_session_set_local_window_size(nghttp2_session *session, in nghttp2_session_set_local_window_size() argument
434 window_size_increment = window_size - session->local_window_size; in nghttp2_session_set_local_window_size()
442 &session->local_window_size, &session->recv_window_size, in nghttp2_session_set_local_window_size()
443 &session->recv_reduction, &window_size_increment); in nghttp2_session_set_local_window_size()
447 &session->local_window_size, &session->recv_window_size, in nghttp2_session_set_local_window_size()
448 &session->recv_reduction, &window_size_increment); in nghttp2_session_set_local_window_size()
455 return nghttp2_session_add_window_update(session, 0, stream_id, in nghttp2_session_set_local_window_size()
459 return nghttp2_session_update_recv_connection_window_size(session, 0); in nghttp2_session_set_local_window_size()
461 stream = nghttp2_session_get_stream(session, stream_id); in nghttp2_session_set_local_window_size()
488 return nghttp2_session_add_window_update(session, 0, stream_id, in nghttp2_session_set_local_window_size()
492 return nghttp2_session_update_recv_stream_window_size(session, stream, 0, in nghttp2_session_set_local_window_size()
499 int nghttp2_submit_altsvc(nghttp2_session *session, uint8_t flags, in nghttp2_submit_altsvc() argument
513 mem = &session->mem; in nghttp2_submit_altsvc()
515 if (!session->server) { in nghttp2_submit_altsvc()
568 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_altsvc()
584 int nghttp2_submit_origin(nghttp2_session *session, uint8_t flags, in nghttp2_submit_origin() argument
597 mem = &session->mem; in nghttp2_submit_origin()
599 if (!session->server) { in nghttp2_submit_origin()
651 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_origin()
681 int32_t nghttp2_submit_request(nghttp2_session *session, in nghttp2_submit_request() argument
689 if (session->server) { in nghttp2_submit_request()
694 rv = detect_self_dependency(session, -1, pri_spec); in nghttp2_submit_request()
704 return submit_headers_shared_nva(session, flags, -1, pri_spec, nva, nvlen, in nghttp2_submit_request()
716 int nghttp2_submit_response(nghttp2_session *session, int32_t stream_id, in nghttp2_submit_response() argument
725 if (!session->server) { in nghttp2_submit_response()
730 return submit_headers_shared_nva(session, flags, stream_id, NULL, nva, nvlen, in nghttp2_submit_response()
734 int nghttp2_submit_data(nghttp2_session *session, uint8_t flags, in nghttp2_submit_data() argument
744 mem = &session->mem; in nghttp2_submit_data()
766 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_data()
789 int nghttp2_submit_extension(nghttp2_session *session, uint8_t type, in nghttp2_submit_extension() argument
796 mem = &session->mem; in nghttp2_submit_extension()
802 if (!session->callbacks.pack_extension_callback) { in nghttp2_submit_extension()
816 rv = nghttp2_session_add_item(session, item); in nghttp2_submit_extension()