Lines Matching refs:data
162 struct Curl_easy *data)
167 DEBUGASSERT(data->multi);
168 for(sdata = data->multi->easyp; sdata; sdata = sdata->next) {
169 if(sdata->conn == data->conn) {
173 Curl_expire(data, 0, EXPIRE_RUN_NOW);
174 CURL_TRC_CF(data, cf, "[%"PRId64"] unblock", stream->id);
181 struct Curl_easy *data)
184 struct stream_ctx *stream = H3_STREAM_CTX(data);
193 H3_STREAM_LCTX(data) = stream;
201 static void h3_data_done(struct Curl_cfilter *cf, struct Curl_easy *data)
204 struct stream_ctx *stream = H3_STREAM_CTX(data);
208 CURL_TRC_CF(data, cf, "[%"PRId64"] easy handle is done", stream->id);
222 H3_STREAM_LCTX(data) = NULL;
227 struct Curl_easy *data)
229 struct stream_ctx *stream = H3_STREAM_CTX(data);
236 if(data->state.select_bits != bits) {
237 data->state.select_bits = bits;
238 Curl_expire(data, 0, EXPIRE_RUN_NOW);
243 struct Curl_easy *data,
249 if(H3_STREAM_ID(data) == stream3_id) {
250 return data;
253 DEBUGASSERT(data->multi);
254 for(sdata = data->multi->easyp; sdata; sdata = sdata->next) {
255 if((sdata->conn == data->conn) && H3_STREAM_ID(sdata) == stream3_id) {
264 * write_resp_raw() copies response data in raw format to the `data`'s
266 * `data`'s overflow buffer.
269 struct Curl_easy *data,
272 struct stream_ctx *stream = H3_STREAM_CTX(data);
294 struct Curl_easy *data;
302 struct stream_ctx *stream = H3_STREAM_CTX(x->data);
309 CURL_TRC_CF(x->data, x->cf, "[%" PRId64 "] status: %.*s",
311 result = write_resp_raw(x->cf, x->data, "HTTP/3 ", sizeof("HTTP/3 ") - 1);
313 result = write_resp_raw(x->cf, x->data, value, value_len);
315 result = write_resp_raw(x->cf, x->data, " \r\n", 3);
318 CURL_TRC_CF(x->data, x->cf, "[%" PRId64 "] header: %.*s: %.*s",
321 result = write_resp_raw(x->cf, x->data, name, name_len);
323 result = write_resp_raw(x->cf, x->data, ": ", 2);
325 result = write_resp_raw(x->cf, x->data, value, value_len);
327 result = write_resp_raw(x->cf, x->data, "\r\n", 2);
330 CURL_TRC_CF(x->data, x->cf, "[%"PRId64"] on header error %d",
342 struct stream_ctx *stream = H3_STREAM_CTX(x->data);
363 struct Curl_easy *data)
365 struct stream_ctx *stream = H3_STREAM_CTX(data);
374 result = write_resp_raw(cf, data, "\r\n", 2);
381 cb_ctx.data = data;
386 CURL_TRC_CF(data, cf, "[%"PRId64"] recv_body error %zd",
388 failf(data, "Error %d in HTTP/3 response body for stream[%"PRId64"]",
422 struct Curl_easy *data,
426 struct stream_ctx *stream = H3_STREAM_CTX(data);
438 cb_ctx.data = data;
441 failf(data, "Error %d in HTTP/3 response header for stream[%"PRId64"]",
445 CURL_TRC_CF(data, cf, "[%"PRId64"] <- [HEADERS]", stream3_id);
450 result = cf_recv_body(cf, data);
455 CURL_TRC_CF(data, cf, "[%"PRId64"] RESET", stream3_id);
463 CURL_TRC_CF(data, cf, "[%"PRId64"] CLOSED", stream3_id);
465 result = write_resp_raw(cf, data, "\r\n", 2);
475 CURL_TRC_CF(data, cf, "[%"PRId64"] <- [GOAWAY]", stream3_id);
479 CURL_TRC_CF(data, cf, "[%"PRId64"] recv, unhandled event %d",
487 struct Curl_easy *data)
490 struct stream_ctx *stream = H3_STREAM_CTX(data);
502 CURL_TRC_CF(data, cf, "[%"PRId64"] error poll: %"PRId64,
507 sdata = get_stream_easy(cf, data, stream3_id);
509 CURL_TRC_CF(data, cf, "[%"PRId64"] discard event %s for "
517 CURL_TRC_CF(data, cf, "[%"PRId64"] error processing event %s "
521 if(data == sdata) {
537 struct Curl_easy *data;
563 CURL_TRC_CF(r->data, r->cf, "ingress, quiche is DONE");
569 failf(r->data, "SSL certificate problem: %s",
575 failf(r->data, "quiche_conn_recv() == %zd", nread);
580 CURL_TRC_CF(r->data, r->cf, "ingress, quiche only read %zd/%zu bytes",
588 struct Curl_easy *data)
595 result = Curl_vquic_tls_before_recv(&ctx->tls, cf, data);
600 rctx.data = data;
603 result = vquic_recv_packets(cf, data, &ctx->q, 1000, recv_pkt, &rctx);
610 check_resumes(cf, data);
612 return cf_poll_events(cf, data);
617 struct Curl_easy *data;
636 failf(x->data, "quiche_conn_send returned %zd", nwritten);
645 * flush_egress drains the buffers and sends off data.
649 struct Curl_easy *data)
663 failf(data, "quiche_conn_on_timeout closed the connection");
668 result = vquic_flush(cf, data, &ctx->q);
671 Curl_expire(data, 1, EXPIRE_QUIC);
678 readx.data = data;
690 result = vquic_send(cf, data, &ctx->q, gsolen);
693 Curl_expire(data, 1, EXPIRE_QUIC);
703 result = vquic_send(cf, data, &ctx->q, gsolen);
706 Curl_expire(data, 1, EXPIRE_QUIC);
720 Curl_expire(data, (timeout_ns / 1000000), EXPIRE_QUIC);
725 struct Curl_easy *data,
728 struct stream_ctx *stream = H3_STREAM_CTX(data);
733 failf(data,
736 CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_recv, was reset -> %d",
740 failf(data,
746 CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_recv, closed incomplete"
756 static ssize_t cf_quiche_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
760 struct stream_ctx *stream = H3_STREAM_CTX(data);
774 CURL_TRC_CF(data, cf, "[%" PRId64 "] read recvbuf(len=%zu) "
780 if(cf_process_ingress(cf, data)) {
781 CURL_TRC_CF(data, cf, "cf_recv, error on ingress");
791 CURL_TRC_CF(data, cf, "[%" PRId64 "] read recvbuf(len=%zu) "
799 drain_stream(cf, data);
803 nread = recv_closed_stream(cf, data, err);
807 failf(data, "QUIC connection is draining");
817 result = cf_flush_egress(cf, data);
819 CURL_TRC_CF(data, cf, "cf_recv, flush egress failed");
825 CURL_TRC_CF(data, cf, "[%"PRId64"] cf_recv(total=%"
836 struct Curl_easy *data,
841 struct stream_ctx *stream = H3_STREAM_CTX(data);
849 *err = h3_data_setup(cf, data);
853 stream = H3_STREAM_CTX(data);
864 /* need more data */
869 *err = Curl_http_req_to_h2(&h2_headers, stream->h1.req, data);
893 switch(data->state.httpreq) {
898 if(data->state.infilesize != -1)
899 stream->upload_left = data->state.infilesize;
901 /* data sending without specifying the data amount up front */
918 CURL_TRC_CF(data, cf, "[%"PRId64"] blocked", stream->id);
925 CURL_TRC_CF(data, cf, "send_request(%s) -> %" PRId64,
926 data->state.url, stream3_id);
939 if(Curl_trc_is_verbose(data)) {
940 infof(data, "[HTTP/3] [%" PRId64 "] OPENED stream for %s",
941 stream->id, data->state.url);
943 infof(data, "[HTTP/3] [%" PRId64 "] [%.*s: %.*s]", stream->id,
955 static ssize_t cf_quiche_send(struct Curl_cfilter *cf, struct Curl_easy *data,
959 struct stream_ctx *stream = H3_STREAM_CTX(data);
965 *err = cf_process_ingress(cf, data);
972 nwritten = h3_open_stream(cf, data, buf, len, err);
975 stream = H3_STREAM_CTX(data);
981 * silently discard the send data.
987 CURL_TRC_CF(data, cf, "[%" PRId64 "] discarding data"
993 CURL_TRC_CF(data, cf, "[%" PRId64 "] send_body(len=%zu) "
1008 CURL_TRC_CF(data, cf, "[%" PRId64 "] send_body(len=%zu) "
1017 CURL_TRC_CF(data, cf, "[%" PRId64 "] send_body(len=%zu) "
1024 CURL_TRC_CF(data, cf, "[%" PRId64 "] send_body(len=%zu) "
1031 CURL_TRC_CF(data, cf, "[%" PRId64 "] send_body(len=%zu) "
1046 CURL_TRC_CF(data, cf, "[%" PRId64 "] send body(len=%zu, "
1054 result = cf_flush_egress(cf, data);
1059 CURL_TRC_CF(data, cf, "[%" PRId64 "] cf_send(len=%zu) -> %zd, %d",
1065 struct Curl_easy *data)
1068 struct stream_ctx *stream = H3_STREAM_CTX(data);
1075 struct Curl_easy *data,
1084 Curl_pollset_check(data, ps, ctx->q.sockfd, &want_recv, &want_send);
1086 struct stream_ctx *stream = H3_STREAM_CTX(data);
1092 (stream->quic_flow_blocked || !stream_is_writeable(cf, data));
1097 Curl_pollset_set(data, ps, ctx->q.sockfd, want_recv, want_send);
1103 * to receive more data from the connection.
1106 const struct Curl_easy *data)
1108 const struct stream_ctx *stream = H3_STREAM_CTX(data);
1114 struct Curl_easy *data,
1120 drain_stream(cf, data);
1121 Curl_expire(data, 0, EXPIRE_RUN_NOW);
1127 struct Curl_easy *data,
1138 result = h3_data_pause(cf, data, (arg1 != 0));
1141 h3_data_done(cf, data);
1144 h3_data_done(cf, data);
1147 struct stream_ctx *stream = H3_STREAM_CTX(data);
1155 sent = cf_quiche_send(cf, data, body, 0, &result);
1156 CURL_TRC_CF(data, cf, "[%"PRId64"] DONE_SEND -> %zd, %d",
1162 struct stream_ctx *stream = H3_STREAM_CTX(data);
1164 result = cf_flush_egress(cf, data);
1166 CURL_TRC_CF(data, cf, "data idle, flush egress -> %d", result);
1177 struct Curl_easy *data)
1209 failf(data, "can't create quiche config");
1235 result = Curl_vquic_tls_init(&ctx->tls, cf, data, &ctx->peer,
1242 result = Curl_rand(data, ctx->scid, sizeof(ctx->scid));
1246 Curl_cf_socket_peek(cf->next, data, &ctx->q.sockfd,
1261 failf(data, "can't create quiche connection");
1269 (void)Curl_qlogdir(data, ctx->scid, sizeof(ctx->scid), &qfd);
1276 result = cf_flush_egress(cf, data);
1291 CURL_TRC_CF(data, cf, "Sent QUIC client Initial, ALPN: %s",
1299 struct Curl_easy *data)
1307 return Curl_vquic_tls_verify_peer(&ctx->tls, cf, data, &ctx->peer);
1311 struct Curl_easy *data,
1324 result = Curl_conn_cf_connect(cf->next, data, blocking, done);
1335 CURL_TRC_CF(data, cf, "waiting for reconnect time");
1340 result = cf_connect_start(cf, data);
1344 result = cf_flush_egress(cf, data);
1349 result = cf_process_ingress(cf, data);
1353 result = cf_flush_egress(cf, data);
1359 CURL_TRC_CF(data, cf, "handshake complete after %dms",
1361 result = cf_quiche_verify_peer(cf, data);
1363 CURL_TRC_CF(data, cf, "peer verified");
1396 Curl_cf_socket_peek(cf->next, data, NULL, NULL,
1398 infof(data, "connect to %s port %u failed: %s",
1405 static void cf_quiche_close(struct Curl_cfilter *cf, struct Curl_easy *data)
1415 (void)cf_flush_egress(cf, data);
1421 static void cf_quiche_destroy(struct Curl_cfilter *cf, struct Curl_easy *data)
1425 (void)data;
1432 struct Curl_easy *data,
1444 CURL_TRC_CF(data, cf, "query: MAX_CONCURRENT -> %d", *pres1);
1471 cf->next->cft->query(cf->next, data, query, pres1, pres2) :
1476 struct Curl_easy *data,
1505 if(!cf->next || !cf->next->cft->is_alive(cf->next, data, input_pending))
1510 not in use by any other transfer, there shouldn't be any data here,
1513 if(cf_process_ingress(cf, data))
1542 struct Curl_easy *data,
1550 (void)data;
1562 result = Curl_cf_udp_create(&udp_cf, data, conn, ai, TRNSPRT_QUIC);
1574 Curl_conn_cf_discard_sub(cf, udp_cf, data, TRUE);
1582 bool Curl_conn_is_quiche(const struct Curl_easy *data,
1588 (void)data;