Lines Matching refs:bufq

49  * The same pool can be shared by many `bufq` instances. However, a pool
69 * `bufq`s can be empty or full or neither. Its `len` is the number
70 * of bytes that can be read. For an empty bufq, `len` will be 0.
72 * By default, a bufq can hold up to `max_chunks * chunk_size` number
74 * `tail` chunk is full, the bufq will report that it is full.
76 * On a full bufq, `len` may be less than the maximum number of bytes,
80 * By default, writing to a full bufq will return (-1, CURLE_AGAIN). Same
81 * as reading from an empty bufq.
82 * With `BUFQ_OPT_SOFT_LIMIT` set, a bufq will allow writing becond this
87 * By default and without a pool, a bufq will keep chunks that read
91 * When providing a pool to a bufq, all chunk creation and spare handling
94 struct bufq {
111 * Make `max_chunks` a "soft" limit. A bufq will report that it is "full"
122 * each of size `chunk_size`. The bufq will not allow writing of
125 void Curl_bufq_init(struct bufq *q, size_t chunk_size, size_t max_chunks);
131 void Curl_bufq_init2(struct bufq *q, size_t chunk_size,
134 void Curl_bufq_initp(struct bufq *q, struct bufc_pool *pool,
141 void Curl_bufq_reset(struct bufq *q);
146 void Curl_bufq_free(struct bufq *q);
151 size_t Curl_bufq_len(const struct bufq *q);
156 * be expected to be written successfully to the bufq,
159 size_t Curl_bufq_space(const struct bufq *q);
164 bool Curl_bufq_is_empty(const struct bufq *q);
169 bool Curl_bufq_is_full(const struct bufq *q);
177 ssize_t Curl_bufq_write(struct bufq *q,
187 ssize_t Curl_bufq_read(struct bufq *q, unsigned char *buf, size_t len,
199 bool Curl_bufq_peek(struct bufq *q,
202 bool Curl_bufq_peek_at(struct bufq *q, size_t offset,
210 void Curl_bufq_skip(struct bufq *q, size_t amount);
224 ssize_t Curl_bufq_pass(struct bufq *q, Curl_bufq_writer *writer,
240 ssize_t Curl_bufq_slurp(struct bufq *q, Curl_bufq_reader *reader,
249 ssize_t Curl_bufq_sipn(struct bufq *q, size_t max_len,
255 * Will write bufq content or passed `buf` directly using the `writer`
260 ssize_t Curl_bufq_write_pass(struct bufq *q,