• Home
  • Raw
  • Download

Lines Matching refs:session_ptr

403 static int session_new(nghttp2_session **session_ptr,  in session_new()  argument
416 *session_ptr = nghttp2_mem_calloc(mem, 1, sizeof(nghttp2_session)); in session_new()
417 if (*session_ptr == NULL) { in session_new()
422 (*session_ptr)->mem = *mem; in session_new()
423 mem = &(*session_ptr)->mem; in session_new()
428 nghttp2_stream_init(&(*session_ptr)->root, 0, NGHTTP2_STREAM_FLAG_NONE, in session_new()
432 (*session_ptr)->remote_window_size = NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE; in session_new()
433 (*session_ptr)->recv_window_size = 0; in session_new()
434 (*session_ptr)->consumed_size = 0; in session_new()
435 (*session_ptr)->recv_reduction = 0; in session_new()
436 (*session_ptr)->local_window_size = NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE; in session_new()
438 (*session_ptr)->goaway_flags = NGHTTP2_GOAWAY_NONE; in session_new()
439 (*session_ptr)->local_last_stream_id = (1u << 31) - 1; in session_new()
440 (*session_ptr)->remote_last_stream_id = (1u << 31) - 1; in session_new()
442 (*session_ptr)->pending_local_max_concurrent_stream = in session_new()
444 (*session_ptr)->pending_enable_push = 1; in session_new()
447 (*session_ptr)->server = 1; in session_new()
450 init_settings(&(*session_ptr)->remote_settings); in session_new()
451 init_settings(&(*session_ptr)->local_settings); in session_new()
453 (*session_ptr)->max_incoming_reserved_streams = in session_new()
457 (*session_ptr)->remote_settings.max_concurrent_streams = 100; in session_new()
459 (*session_ptr)->max_send_header_block_length = NGHTTP2_MAX_HEADERSLEN; in session_new()
460 (*session_ptr)->max_outbound_ack = NGHTTP2_DEFAULT_MAX_OBQ_FLOOD_ITEM; in session_new()
461 (*session_ptr)->max_settings = NGHTTP2_DEFAULT_MAX_SETTINGS; in session_new()
467 (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_AUTO_WINDOW_UPDATE; in session_new()
472 (*session_ptr)->remote_settings.max_concurrent_streams = in session_new()
478 (*session_ptr)->max_incoming_reserved_streams = in session_new()
485 (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_RECV_CLIENT_MAGIC; in session_new()
491 (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_HTTP_MESSAGING; in session_new()
495 memcpy((*session_ptr)->user_recv_ext_types, option->user_recv_ext_types, in session_new()
496 sizeof((*session_ptr)->user_recv_ext_types)); in session_new()
500 (*session_ptr)->builtin_recv_ext_types = option->builtin_recv_ext_types; in session_new()
505 (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_AUTO_PING_ACK; in session_new()
509 (*session_ptr)->max_send_header_block_length = in session_new()
519 (*session_ptr)->opt_flags |= NGHTTP2_OPTMASK_NO_CLOSED_STREAMS; in session_new()
523 (*session_ptr)->max_outbound_ack = option->max_outbound_ack; in session_new()
528 (*session_ptr)->max_settings = option->max_settings; in session_new()
532 rv = nghttp2_hd_deflate_init2(&(*session_ptr)->hd_deflater, in session_new()
537 rv = nghttp2_hd_inflate_init(&(*session_ptr)->hd_inflater, mem); in session_new()
541 rv = nghttp2_map_init(&(*session_ptr)->streams, mem); in session_new()
546 nbuffer = ((*session_ptr)->max_send_header_block_length + in session_new()
555 rv = nghttp2_bufs_init3(&(*session_ptr)->aob.framebufs, in session_new()
562 active_outbound_item_reset(&(*session_ptr)->aob, mem); in session_new()
564 (*session_ptr)->callbacks = *callbacks; in session_new()
565 (*session_ptr)->user_data = user_data; in session_new()
567 session_inbound_frame_reset(*session_ptr); in session_new()
570 nghttp2_inbound_frame *iframe = &(*session_ptr)->iframe; in session_new()
572 if (server && ((*session_ptr)->opt_flags & in session_new()
581 (*session_ptr)->aob.state = NGHTTP2_OB_SEND_CLIENT_MAGIC; in session_new()
582 nghttp2_bufs_add(&(*session_ptr)->aob.framebufs, NGHTTP2_CLIENT_MAGIC, in session_new()
590 nghttp2_map_free(&(*session_ptr)->streams); in session_new()
592 nghttp2_hd_inflate_free(&(*session_ptr)->hd_inflater); in session_new()
594 nghttp2_hd_deflate_free(&(*session_ptr)->hd_deflater); in session_new()
596 nghttp2_mem_free(mem, *session_ptr); in session_new()
601 int nghttp2_session_client_new(nghttp2_session **session_ptr, in nghttp2_session_client_new() argument
604 return nghttp2_session_client_new3(session_ptr, callbacks, user_data, NULL, in nghttp2_session_client_new()
608 int nghttp2_session_client_new2(nghttp2_session **session_ptr, in nghttp2_session_client_new2() argument
611 return nghttp2_session_client_new3(session_ptr, callbacks, user_data, option, in nghttp2_session_client_new2()
615 int nghttp2_session_client_new3(nghttp2_session **session_ptr, in nghttp2_session_client_new3() argument
630 *session_ptr = session; in nghttp2_session_client_new3()
635 int nghttp2_session_server_new(nghttp2_session **session_ptr, in nghttp2_session_server_new() argument
638 return nghttp2_session_server_new3(session_ptr, callbacks, user_data, NULL, in nghttp2_session_server_new()
642 int nghttp2_session_server_new2(nghttp2_session **session_ptr, in nghttp2_session_server_new2() argument
645 return nghttp2_session_server_new3(session_ptr, callbacks, user_data, option, in nghttp2_session_server_new2()
649 int nghttp2_session_server_new3(nghttp2_session **session_ptr, in nghttp2_session_server_new3() argument
664 *session_ptr = session; in nghttp2_session_server_new3()