Lines Matching refs:len

460 h2_recv_goaway (connection * const con, const uint8_t * const s, uint32_t len)  in h2_recv_goaway()  argument
464 if (len < 8) { /*(GOAWAY frame length must be >= 8)*/ in h2_recv_goaway()
478 if (len > 8) { in h2_recv_goaway()
496 h2_recv_rst_stream (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_rst_stream() argument
500 if (4 != len) { /*(RST_STREAM frame length must be 4)*/ in h2_recv_rst_stream()
541 h2_recv_ping (connection * const con, uint8_t * const s, const uint32_t len) in h2_recv_ping() argument
561 if (8 != len) { /*(PING frame length must be 8)*/ in h2_recv_ping()
610 h2_parse_priority_update (const char * const prio, const uint32_t len) in __attribute_nonnull__()
616 for (uint32_t i = 0; i < len; ++i) { in __attribute_nonnull__()
619 if (i+2 < len && prio[i+1] == '=') { in __attribute_nonnull__()
630 if (i+3 < len && prio[i+1] == '=' && prio[i+2] == '?') { in __attribute_nonnull__()
637 else if (i+1 == len in __attribute_nonnull__()
643 do { ++i; } while (i < len && prio[i] != ','); /*advance to next token*/ in __attribute_nonnull__()
653 h2_recv_priority_update (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_priority_update() argument
657 if (len < 4) { /*(PRIORITY_UPDATE frame len must be >=4)*/ in h2_recv_priority_update()
675 uint8_t prio = h2_parse_priority_update((char *)s+13, len-4); in h2_recv_priority_update()
704 h2_recv_priority (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_priority() argument
708 if (5 != len) { /*(PRIORITY frame length must be 5)*/ in h2_recv_priority()
753 h2_recv_window_update (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_window_update() argument
757 if (4 != len) { /*(WINDOW_UPDATE frame length must be 4)*/ in h2_recv_window_update()
812 h2_send_window_update (connection * const con, uint32_t h2id, const uint32_t len) in h2_send_window_update() argument
814 if (0 == len) return; in h2_send_window_update()
829 window_upd.u[3] = htonl(len); in h2_send_window_update()
837 h2_send_window_update_unit (connection * const con, request_st * const r, const uint32_t len) in h2_send_window_update_unit() argument
839 r->h2_rwin_fudge -= (int16_t)len; in h2_send_window_update_unit()
848 h2_parse_frame_settings (connection * const con, const uint8_t *s, uint32_t len) in h2_parse_frame_settings() argument
853 for (; len >= 6; len -= 6, s += 6) { in h2_parse_frame_settings()
919 if (len) { in h2_parse_frame_settings()
931 h2_recv_settings (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_settings() argument
942 h2_parse_frame_settings(con, s+9, len); in h2_recv_settings()
951 if (0 != len) in h2_recv_settings()
982 h2_recv_data (connection * const con, const uint8_t * const s, const uint32_t len) in h2_recv_data() argument
997 uint32_t alen = len; /* actual data len, minus padding */ in h2_recv_data()
1001 if (pad >= len) { in h2_recv_data()
1042 chunkqueue_mark_written(cq, 9+len); in h2_recv_data()
1044 h2_send_window_update_unit(con, h2r, len); /*(h2r->h2_rwin)*/ in h2_recv_data()
1057 chunkqueue_mark_written(cq, 9+len); in h2_recv_data()
1058 h2_send_window_update_unit(con, h2r, len); /*(h2r->h2_rwin)*/ in h2_recv_data()
1083 h2_send_window_update_unit(con, h2r, len); /*(h2r->h2_rwin)*/ in h2_recv_data()
1094 chunkqueue_mark_written(cq, 9+len); in h2_recv_data()
1107 chunkqueue_mark_written(cq, 9+len); in h2_recv_data()
1114 wupd = len; in h2_recv_data()
1119 int32_t rwin = r->h2_rwin - (int32_t)len; in h2_recv_data()
1122 wupd=n>=rwin ? (n-=rwin)>(int32_t)len ? len : (uint32_t)n+16384 : 0; in h2_recv_data()
1137 chunkqueue_mark_written(cq, 9+len); in h2_recv_data()
1192 h2_frame_cq_compact (chunkqueue * const cq, uint32_t len) in h2_frame_cq_compact() argument
1200 chunkqueue_compact_mem(cq, len); in h2_frame_cq_compact()
1660 const uint32_t len = buffer_clen(&r->target); in h2_recv_headers() local
1661 const char * const p = r->target.ptr+len-4; in h2_recv_headers()
1662 if (len>=4 && (0==memcmp(p+1,".js",3)||0==memcmp(p,".css",4))) { in h2_recv_headers()
2074 const uint32_t len = dlen < fsize ? dlen : fsize; in h2_send_hpack() local
2075 headers.c[3] = (len >> 16) & 0xFF; /*(off +3 to skip over align pad)*/ in h2_send_hpack()
2076 headers.c[4] = (len >> 8) & 0xFF; in h2_send_hpack()
2077 headers.c[5] = (len ) & 0xFF; in h2_send_hpack()
2078 if (len == dlen) in h2_send_hpack()
2083 chunkqueue_append_mem(con->write_queue, data, len); in h2_send_hpack()
2086 memcpy(ptr+sizeof(headers)-3, data, len); in h2_send_hpack()
2087 ptr += len + sizeof(headers)-3; in h2_send_hpack()
2089 data += len; in h2_send_hpack()
2090 dlen -= len; in h2_send_hpack()
2114 h2_log_response_header(request_st * const r, const int len, const char * const hdr) in h2_log_response_header() argument
2117 "fd:%d id:%u resp: %.*s", r->con->fd, r->h2id, len, hdr); in h2_log_response_header()
2535 const uint32_t len = buffer_clen(c->mem) - (uint32_t)c->offset;
2539 h2_send_headers_block(r, con, c->mem->ptr + c->offset, len, flags);
2540 chunkqueue_mark_written(&r->write_queue, len);
2596 const uint32_t len = dlen < fsize ? dlen : fsize;
2597 dataframe.c[3] = (len >> 16) & 0xFF; /*(off +3 to skip over align pad)*/
2598 dataframe.c[4] = (len >> 8) & 0xFF;
2599 dataframe.c[5] = (len ) & 0xFF;
2603 chunkqueue_append_mem(con->write_queue, data, len);
2606 memcpy(ptr+sizeof(dataframe)-3, data, len);
2607 ptr += len + sizeof(dataframe)-3;
2609 data += len;
2610 sent += len;
2611 dlen -= len;
2676 const uint32_t len = dlen < fsize ? dlen : fsize-9; in h2_send_cqdata() local
2677 uint32_t blen = len; in h2_send_cqdata()
2679 chunkqueue_append_buffer_open_sz(con->write_queue, 9+len); in h2_send_cqdata()
2682 && blen == len) { in h2_send_cqdata()
2683 dlen -= len; in h2_send_cqdata()
2684 sent += len; in h2_send_cqdata()
2685 dataframe.c[3] = (len >> 16) & 0xFF; /*(+3 to skip align pad)*/ in h2_send_cqdata()
2686 dataframe.c[4] = (len >> 8) & 0xFF; in h2_send_cqdata()
2687 dataframe.c[5] = (len ) & 0xFF; in h2_send_cqdata()
2690 memcpy(b->ptr+9, data, len); in h2_send_cqdata()
2691 buffer_commit(b, 9+len); in h2_send_cqdata()
2693 chunkqueue_mark_written(cq, len); in h2_send_cqdata()
2701 const uint32_t len = dlen < fsize ? dlen : fsize; in h2_send_cqdata() local
2702 dlen -= len; in h2_send_cqdata()
2703 sent += len; in h2_send_cqdata()
2704 dataframe.c[3] = (len >> 16) & 0xFF; /*(off +3 to skip over align pad)*/ in h2_send_cqdata()
2705 dataframe.c[4] = (len >> 8) & 0xFF; in h2_send_cqdata()
2706 dataframe.c[5] = (len ) & 0xFF; in h2_send_cqdata()
2709 chunkqueue_steal(con->write_queue, cq, (off_t)len); in h2_send_cqdata()
2885 const off_t len = chunkqueue_length(cq); in h2_retire_con() local
2887 con->network_write(con, cq, len); in h2_retire_con()