Lines Matching refs:stream

937   nghttp3_qpack_stream *stream = data;
938 nghttp3_qpack_stream_del(stream, mem);
1017 * to a stream denoted by |stream_id|. |stream| must be NULL if no
1018 * stream object is not found for the given stream ID. |max_cnt| and
1030 nghttp3_qpack_stream *stream,
1037 if (stream == NULL) {
1038 rv = nghttp3_qpack_stream_new(&stream, stream_id, mem);
1044 (nghttp3_map_key_type)stream->stream_id, stream);
1047 nghttp3_qpack_stream_del(stream, mem);
1051 prev_max_cnt = nghttp3_qpack_stream_get_max_cnt(stream);
1052 if (nghttp3_qpack_encoder_stream_is_blocked(encoder, stream) &&
1054 nghttp3_qpack_encoder_unblock_stream(encoder, stream);
1063 rv = nghttp3_qpack_stream_add_ref(stream, ref);
1070 nghttp3_qpack_encoder_stream_is_blocked(encoder, stream)) {
1071 rv = nghttp3_qpack_encoder_block_stream(encoder, stream);
1081 nghttp3_qpack_stream *stream) {
1086 (nghttp3_map_key_type)stream->stream_id);
1088 len = nghttp3_ringbuf_len(&stream->refs);
1090 ref = *(nghttp3_qpack_header_block_ref **)nghttp3_ringbuf_get(&stream->refs,
1149 nghttp3_qpack_stream *stream;
1162 stream = nghttp3_qpack_encoder_find_stream(encoder, stream_id);
1164 stream && nghttp3_qpack_encoder_stream_is_blocked(encoder, stream);
1169 DEBUGF("qpack::encode: stream %ld blocked=%d allow_blocking=%d\n", stream_id,
1188 rv = qpack_encoder_add_stream_ref(encoder, stream_id, stream, max_cnt,
1280 nghttp3_qpack_stream *stream) {
1281 return stream && encoder->krcnt < nghttp3_qpack_stream_get_max_cnt(stream);
1336 * minimum insert count which blocked stream requires.
1378 * count which blocked stream requires.
1390 * stream requires.
1672 nghttp3_qpack_stream *stream;
1674 stream = nghttp3_mem_malloc(mem, sizeof(nghttp3_qpack_stream));
1675 if (stream == NULL) {
1679 rv = nghttp3_ringbuf_init(&stream->refs, 4,
1682 nghttp3_mem_free(mem, stream);
1686 nghttp3_pq_init(&stream->max_cnts, ref_max_cnt_greater, mem);
1688 stream->stream_id = stream_id;
1690 *pstream = stream;
1695 void nghttp3_qpack_stream_del(nghttp3_qpack_stream *stream,
1700 if (stream == NULL) {
1704 nghttp3_pq_free(&stream->max_cnts);
1706 len = nghttp3_ringbuf_len(&stream->refs);
1708 ref = *(nghttp3_qpack_header_block_ref **)nghttp3_ringbuf_get(&stream->refs,
1713 nghttp3_ringbuf_free(&stream->refs);
1715 nghttp3_mem_free(mem, stream);
1718 uint64_t nghttp3_qpack_stream_get_max_cnt(const nghttp3_qpack_stream *stream) {
1721 if (nghttp3_pq_empty(&stream->max_cnts)) {
1725 ref = nghttp3_struct_of(nghttp3_pq_top(&stream->max_cnts),
1730 int nghttp3_qpack_stream_add_ref(nghttp3_qpack_stream *stream,
1735 if (nghttp3_ringbuf_full(&stream->refs)) {
1736 rv = nghttp3_ringbuf_reserve(&stream->refs,
1737 nghttp3_ringbuf_len(&stream->refs) * 2);
1743 dest = nghttp3_ringbuf_push_back(&stream->refs);
1746 return nghttp3_pq_push(&stream->max_cnts, &ref->max_cnts_pe);
1749 void nghttp3_qpack_stream_pop_ref(nghttp3_qpack_stream *stream) {
1752 assert(nghttp3_ringbuf_len(&stream->refs));
1755 *(nghttp3_qpack_header_block_ref **)nghttp3_ringbuf_get(&stream->refs, 0);
1759 nghttp3_pq_remove(&stream->max_cnts, &ref->max_cnts_pe);
1761 nghttp3_ringbuf_pop_front(&stream->refs);
2234 nghttp3_qpack_stream *stream) {
2236 nghttp3_struct_of(nghttp3_pq_top(&stream->max_cnts),
2239 (uint64_t)stream->stream_id};
2241 return nghttp3_ksl_insert(&encoder->blocked_streams, NULL, &bsk, stream);
2245 nghttp3_qpack_stream *stream) {
2247 nghttp3_struct_of(nghttp3_pq_top(&stream->max_cnts),
2250 (uint64_t)stream->stream_id};
2257 assert(nghttp3_ksl_it_get(&it) == stream);
2277 nghttp3_qpack_stream *stream =
2282 if (stream == NULL) {
2286 assert(nghttp3_ringbuf_len(&stream->refs));
2289 *(nghttp3_qpack_header_block_ref **)nghttp3_ringbuf_get(&stream->refs, 0);
2291 DEBUGF("qpack::encoder: Header acknowledgement stream=%ld ricnt=%" PRIu64
2301 nghttp3_qpack_stream_pop_ref(stream);
2309 if (nghttp3_ringbuf_len(&stream->refs)) {
2313 qpack_encoder_remove_stream(encoder, stream);
2315 nghttp3_qpack_stream_del(stream, mem);
2343 nghttp3_qpack_stream *stream =
2347 if (stream == NULL) {
2351 if (nghttp3_qpack_encoder_stream_is_blocked(encoder, stream)) {
2352 nghttp3_qpack_encoder_unblock_stream(encoder, stream);
2355 qpack_encoder_remove_stream(encoder, stream);
2357 nghttp3_qpack_stream_del(stream, mem);
3329 DEBUGF("qpack::decode: stream blocked\n");
3642 DEBUGF("qpack::decode: stream still blocked\n");
3942 request stream instruction. Check the absidx again. */