Lines Matching defs:qctx
87 CURLcode vquic_ctx_init(struct cf_quic_ctx *qctx)
89 Curl_bufq_init2(&qctx->sendbuf, NW_CHUNK_SIZE, NW_SEND_CHUNKS,
92 qctx->no_gso = FALSE;
94 qctx->no_gso = TRUE;
102 qctx->wblock_percent = (int)l;
106 vquic_ctx_update_time(qctx);
111 void vquic_ctx_free(struct cf_quic_ctx *qctx)
113 Curl_bufq_free(&qctx->sendbuf);
116 void vquic_ctx_update_time(struct cf_quic_ctx *qctx)
118 qctx->last_op = Curl_now();
123 struct cf_quic_ctx *qctx,
129 struct cf_quic_ctx *qctx,
164 while((sent = sendmsg(qctx->sockfd, &msg, 0)) == -1 && SOCKERRNO == EINTR)
182 qctx->no_gso = TRUE;
183 return send_packet_no_gso(cf, data, qctx, pkt, pktlen, gsolen, psent);
200 while((sent = send(qctx->sockfd,
227 struct cf_quic_ctx *qctx,
238 CURLcode curlcode = do_sendmsg(cf, data, qctx, p, len, len, &sent);
250 struct cf_quic_ctx *qctx,
257 if(qctx->wblock_percent > 0) {
260 if(c >= ((100-qctx->wblock_percent)*256/100)) {
266 if(qctx->no_gso && pktlen > gsolen) {
267 result = send_packet_no_gso(cf, data, qctx, pkt, pktlen, gsolen, psent);
270 result = do_sendmsg(cf, data, qctx, pkt, pktlen, gsolen, psent);
273 qctx->last_io = qctx->last_op;
278 struct cf_quic_ctx *qctx)
285 while(Curl_bufq_peek(&qctx->sendbuf, &buf, &blen)) {
286 gsolen = qctx->gsolen;
287 if(qctx->split_len) {
288 gsolen = qctx->split_gsolen;
289 if(blen > qctx->split_len)
290 blen = qctx->split_len;
293 result = vquic_send_packets(cf, data, qctx, buf, blen, gsolen, &sent);
298 Curl_bufq_skip(&qctx->sendbuf, sent);
299 if(qctx->split_len)
300 qctx->split_len -= sent;
304 Curl_bufq_skip(&qctx->sendbuf, sent);
305 if(qctx->split_len)
306 qctx->split_len -= sent;
312 struct cf_quic_ctx *qctx, size_t gsolen)
314 qctx->gsolen = gsolen;
315 return vquic_flush(cf, data, qctx);
319 struct cf_quic_ctx *qctx, size_t gsolen,
322 DEBUGASSERT(Curl_bufq_len(&qctx->sendbuf) > tail_len);
323 qctx->split_len = Curl_bufq_len(&qctx->sendbuf) - tail_len;
324 qctx->split_gsolen = gsolen;
325 qctx->gsolen = tail_gsolen;
327 qctx->split_len, qctx->split_gsolen,
328 tail_len, qctx->gsolen);
329 return vquic_flush(cf, data, qctx);
335 struct cf_quic_ctx *qctx,
364 while((mcount = recvmmsg(qctx->sockfd, mmsg, n, 0, NULL)) == -1 &&
411 struct cf_quic_ctx *qctx,
435 while((nread = recvmsg(qctx->sockfd, &msg, 0)) == -1 &&
477 struct cf_quic_ctx *qctx,
492 while((nread = recvfrom(qctx->sockfd, (char *)buf, bufsize, 0,
537 struct cf_quic_ctx *qctx,
543 result = recvmmsg_packets(cf, data, qctx, max_pkts, recv_cb, userp);
545 result = recvmsg_packets(cf, data, qctx, max_pkts, recv_cb, userp);
547 result = recvfrom_packets(cf, data, qctx, max_pkts, recv_cb, userp);
550 if(!qctx->got_first_byte) {
551 qctx->got_first_byte = TRUE;
552 qctx->first_byte_at = qctx->last_op;
554 qctx->last_io = qctx->last_op;