Lines Matching refs:qctx
79 CURLcode vquic_ctx_init(struct cf_quic_ctx *qctx) in vquic_ctx_init() argument
81 Curl_bufq_init2(&qctx->sendbuf, NW_CHUNK_SIZE, NW_SEND_CHUNKS, in vquic_ctx_init()
84 qctx->no_gso = FALSE; in vquic_ctx_init()
86 qctx->no_gso = TRUE; in vquic_ctx_init()
94 qctx->wblock_percent = (int)l; in vquic_ctx_init()
98 vquic_ctx_update_time(qctx); in vquic_ctx_init()
103 void vquic_ctx_free(struct cf_quic_ctx *qctx) in vquic_ctx_free() argument
105 Curl_bufq_free(&qctx->sendbuf); in vquic_ctx_free()
108 void vquic_ctx_update_time(struct cf_quic_ctx *qctx) in vquic_ctx_update_time() argument
110 qctx->last_op = Curl_now(); in vquic_ctx_update_time()
115 struct cf_quic_ctx *qctx,
121 struct cf_quic_ctx *qctx, in do_sendmsg() argument
156 while((sent = sendmsg(qctx->sockfd, &msg, 0)) == -1 && SOCKERRNO == EINTR) in do_sendmsg()
174 qctx->no_gso = TRUE; in do_sendmsg()
175 return send_packet_no_gso(cf, data, qctx, pkt, pktlen, gsolen, psent); in do_sendmsg()
192 while((sent = send(qctx->sockfd, in do_sendmsg()
219 struct cf_quic_ctx *qctx, in send_packet_no_gso() argument
230 CURLcode curlcode = do_sendmsg(cf, data, qctx, p, len, len, &sent); in send_packet_no_gso()
242 struct cf_quic_ctx *qctx, in vquic_send_packets() argument
249 if(qctx->wblock_percent > 0) { in vquic_send_packets()
252 if(c >= ((100-qctx->wblock_percent)*256/100)) { in vquic_send_packets()
258 if(qctx->no_gso && pktlen > gsolen) { in vquic_send_packets()
259 result = send_packet_no_gso(cf, data, qctx, pkt, pktlen, gsolen, psent); in vquic_send_packets()
262 result = do_sendmsg(cf, data, qctx, pkt, pktlen, gsolen, psent); in vquic_send_packets()
265 qctx->last_io = qctx->last_op; in vquic_send_packets()
270 struct cf_quic_ctx *qctx) in vquic_flush() argument
277 while(Curl_bufq_peek(&qctx->sendbuf, &buf, &blen)) { in vquic_flush()
278 gsolen = qctx->gsolen; in vquic_flush()
279 if(qctx->split_len) { in vquic_flush()
280 gsolen = qctx->split_gsolen; in vquic_flush()
281 if(blen > qctx->split_len) in vquic_flush()
282 blen = qctx->split_len; in vquic_flush()
285 result = vquic_send_packets(cf, data, qctx, buf, blen, gsolen, &sent); in vquic_flush()
290 Curl_bufq_skip(&qctx->sendbuf, sent); in vquic_flush()
291 if(qctx->split_len) in vquic_flush()
292 qctx->split_len -= sent; in vquic_flush()
296 Curl_bufq_skip(&qctx->sendbuf, sent); in vquic_flush()
297 if(qctx->split_len) in vquic_flush()
298 qctx->split_len -= sent; in vquic_flush()
304 struct cf_quic_ctx *qctx, size_t gsolen) in vquic_send() argument
306 qctx->gsolen = gsolen; in vquic_send()
307 return vquic_flush(cf, data, qctx); in vquic_send()
311 struct cf_quic_ctx *qctx, size_t gsolen, in vquic_send_tail_split() argument
314 DEBUGASSERT(Curl_bufq_len(&qctx->sendbuf) > tail_len); in vquic_send_tail_split()
315 qctx->split_len = Curl_bufq_len(&qctx->sendbuf) - tail_len; in vquic_send_tail_split()
316 qctx->split_gsolen = gsolen; in vquic_send_tail_split()
317 qctx->gsolen = tail_gsolen; in vquic_send_tail_split()
319 qctx->split_len, qctx->split_gsolen, in vquic_send_tail_split()
320 tail_len, qctx->gsolen); in vquic_send_tail_split()
321 return vquic_flush(cf, data, qctx); in vquic_send_tail_split()
357 struct cf_quic_ctx *qctx, in recvmmsg_packets() argument
399 while((mcount = recvmmsg(qctx->sockfd, mmsg, n, 0, NULL)) == -1 && in recvmmsg_packets()
461 struct cf_quic_ctx *qctx, in recvmsg_packets() argument
491 while((nread = recvmsg(qctx->sockfd, &msg, 0)) == -1 && in recvmsg_packets()
548 struct cf_quic_ctx *qctx, in recvfrom_packets() argument
563 while((nread = recvfrom(qctx->sockfd, (char *)buf, bufsize, 0, in recvfrom_packets()
606 struct cf_quic_ctx *qctx, in vquic_recv_packets() argument
612 result = recvmmsg_packets(cf, data, qctx, max_pkts, recv_cb, userp); in vquic_recv_packets()
614 result = recvmsg_packets(cf, data, qctx, max_pkts, recv_cb, userp); in vquic_recv_packets()
616 result = recvfrom_packets(cf, data, qctx, max_pkts, recv_cb, userp); in vquic_recv_packets()
619 if(!qctx->got_first_byte) { in vquic_recv_packets()
620 qctx->got_first_byte = TRUE; in vquic_recv_packets()
621 qctx->first_byte_at = qctx->last_op; in vquic_recv_packets()
623 qctx->last_io = qctx->last_op; in vquic_recv_packets()