Lines Matching refs:qs
58 struct quicsocket *qs);
61 struct quicsocket *qs);
92 static CURLcode qs_disconnect(struct quicsocket *qs) in qs_disconnect() argument
94 if(qs->h3config) in qs_disconnect()
95 quiche_h3_config_free(qs->h3config); in qs_disconnect()
96 if(qs->h3c) in qs_disconnect()
97 quiche_h3_conn_free(qs->h3c); in qs_disconnect()
98 if(qs->cfg) { in qs_disconnect()
99 quiche_config_free(qs->cfg); in qs_disconnect()
100 qs->cfg = NULL; in qs_disconnect()
102 if(qs->conn) { in qs_disconnect()
103 quiche_conn_free(qs->conn); in qs_disconnect()
104 qs->conn = NULL; in qs_disconnect()
112 struct quicsocket *qs = conn->quic; in quiche_disconnect() local
114 return qs_disconnect(qs); in quiche_disconnect()
174 struct quicsocket *qs = &conn->hequic[sockindex]; in Curl_quic_connect() local
190 qs->cfg = quiche_config_new(QUICHE_PROTOCOL_VERSION); in Curl_quic_connect()
191 if(!qs->cfg) { in Curl_quic_connect()
196 quiche_config_set_max_idle_timeout(qs->cfg, QUIC_IDLE_TIMEOUT); in Curl_quic_connect()
197 quiche_config_set_initial_max_data(qs->cfg, QUIC_MAX_DATA); in Curl_quic_connect()
198 quiche_config_set_initial_max_stream_data_bidi_local(qs->cfg, QUIC_MAX_DATA); in Curl_quic_connect()
199 quiche_config_set_initial_max_stream_data_bidi_remote(qs->cfg, in Curl_quic_connect()
201 quiche_config_set_initial_max_stream_data_uni(qs->cfg, QUIC_MAX_DATA); in Curl_quic_connect()
202 quiche_config_set_initial_max_streams_bidi(qs->cfg, QUIC_MAX_STREAMS); in Curl_quic_connect()
203 quiche_config_set_initial_max_streams_uni(qs->cfg, QUIC_MAX_STREAMS); in Curl_quic_connect()
204 quiche_config_set_application_protos(qs->cfg, in Curl_quic_connect()
210 result = Curl_rand(data, qs->scid, sizeof(qs->scid)); in Curl_quic_connect()
217 quiche_config_log_keys(qs->cfg); in Curl_quic_connect()
219 qs->conn = quiche_connect(conn->host.name, (const uint8_t *) qs->scid, in Curl_quic_connect()
220 sizeof(qs->scid), qs->cfg); in Curl_quic_connect()
221 if(!qs->conn) { in Curl_quic_connect()
227 quiche_conn_set_keylog_path(qs->conn, keylog_file); in Curl_quic_connect()
233 (void)Curl_qlogdir(data, qs->scid, sizeof(qs->scid), &qfd); in Curl_quic_connect()
235 quiche_conn_set_qlog_fd(qs->conn, qfd, in Curl_quic_connect()
240 result = flush_egress(conn, sockfd, qs); in Curl_quic_connect()
281 struct quicsocket *qs = conn->quic = &conn->hequic[tempindex]; in quiche_has_connected() local
290 qs->h3config = quiche_h3_config_new(); in quiche_has_connected()
291 if(!qs->h3config) in quiche_has_connected()
295 qs->h3c = quiche_h3_conn_new_with_transport(qs->conn, qs->h3config); in quiche_has_connected()
296 if(!qs->h3c) { in quiche_has_connected()
301 qs = &conn->hequic[1-tempindex]; in quiche_has_connected()
302 quiche_config_free(qs->cfg); in quiche_has_connected()
303 quiche_conn_free(qs->conn); in quiche_has_connected()
304 qs->cfg = NULL; in quiche_has_connected()
305 qs->conn = NULL; in quiche_has_connected()
309 quiche_h3_config_free(qs->h3config); in quiche_has_connected()
310 quiche_h3_conn_free(qs->h3c); in quiche_has_connected()
321 struct quicsocket *qs = &conn->hequic[sockindex]; in Curl_quic_is_connected() local
324 result = process_ingress(conn, sockfd, qs); in Curl_quic_is_connected()
328 result = flush_egress(conn, sockfd, qs); in Curl_quic_is_connected()
332 if(quiche_conn_is_established(qs->conn)) { in Curl_quic_is_connected()
340 qs_disconnect(qs); in Curl_quic_is_connected()
345 struct quicsocket *qs) in process_ingress() argument
353 quiche_conn_on_timeout(qs->conn); in process_ingress()
366 recvd = quiche_conn_recv(qs->conn, buf, recvd); in process_ingress()
384 struct quicsocket *qs) in flush_egress() argument
391 sent = quiche_conn_send(qs->conn, out, sizeof(out)); in flush_egress()
409 timeout_ns = quiche_conn_timeout_as_nanos(qs->conn); in flush_egress()
458 struct quicsocket *qs = conn->quic; in h3_stream_recv() local
469 if(process_ingress(conn, sockfd, qs)) { in h3_stream_recv()
476 int64_t s = quiche_h3_conn_poll(qs->h3c, qs->conn, &ev); in h3_stream_recv()
510 rcode = quiche_h3_recv_body(qs->h3c, qs->conn, s, (unsigned char *)buf, in h3_stream_recv()
529 if(flush_egress(conn, sockfd, qs)) { in h3_stream_recv()
550 struct quicsocket *qs = conn->quic; in h3_stream_send() local
565 sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id, in h3_stream_send()
573 if(flush_egress(conn, sockfd, qs)) { in h3_stream_send()
608 struct quicsocket *qs = conn->quic; in http_request() local
781 stream3_id = quiche_h3_send_request(qs->h3c, qs->conn, nva, nheader, in http_request()
784 ssize_t sent = quiche_h3_send_body(qs->h3c, qs->conn, stream3_id, in http_request()
795 stream3_id = quiche_h3_send_request(qs->h3c, qs->conn, nva, nheader, in http_request()
829 struct quicsocket *qs = conn->quic; in Curl_quic_done_sending() local
832 sent = quiche_h3_send_body(qs->h3c, qs->conn, stream->stream3_id, in Curl_quic_done_sending()