[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 79/220: quiche: make use of the connection timeout
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 79/220: quiche: make use of the connection timeout API properly |
Date: |
Thu, 12 Sep 2019 17:27:19 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 1f145b02d95f42ffba23fa6ea6a867aeba3cbdc1
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Aug 7 12:49:27 2019 +0200
quiche: make use of the connection timeout API properly
---
lib/urldata.h | 1 +
lib/vquic/quiche.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/lib/urldata.h b/lib/urldata.h
index b3b1263c6..eabb1b5c7 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1227,6 +1227,7 @@ typedef enum {
EXPIRE_SPEEDCHECK,
EXPIRE_TIMEOUT,
EXPIRE_TOOFAST,
+ EXPIRE_QUIC,
EXPIRE_LAST /* not an actual timer, used as a marker only */
} expire_id;
diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c
index 67c2b1b42..c4e7b03fe 100644
--- a/lib/vquic/quiche.c
+++ b/lib/vquic/quiche.c
@@ -209,6 +209,9 @@ static CURLcode process_ingress(struct connectdata *conn,
int sockfd)
uint8_t *buf = (uint8_t *)data->state.buffer;
size_t bufsize = data->set.buffer_size;
+ /* in case the timeout expired */
+ quiche_conn_on_timeout(qs->conn);
+
do {
recvd = recv(sockfd, buf, bufsize, 0);
if((recvd < 0) && ((errno == EAGAIN) || (errno == EWOULDBLOCK)))
@@ -241,6 +244,7 @@ static CURLcode flush_egress(struct connectdata *conn, int
sockfd)
ssize_t sent;
struct quicsocket *qs = &conn->quic;
static uint8_t out[1200];
+ int64_t timeout_ns;
do {
sent = quiche_conn_send(qs->conn, out, sizeof(out));
@@ -260,6 +264,12 @@ static CURLcode flush_egress(struct connectdata *conn, int
sockfd)
}
} while(1);
+ /* time until the next timeout event, as nanoseconds. */
+ timeout_ns = quiche_conn_timeout_as_nanos(qs->conn);
+ if(timeout_ns)
+ /* expire uses milliseconds */
+ Curl_expire(conn->data, (timeout_ns + 999999) / 1000000, EXPIRE_QUIC);
+
return CURLE_OK;
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [gnurl] 47/220: url: make use of new HTTP version if alt-svc has one, (continued)
- [GNUnet-SVN] [gnurl] 47/220: url: make use of new HTTP version if alt-svc has one, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 48/220: OS400: Add CURLOPT_H3 symbols, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 55/220: md4: No need for the NTLM code to call Curl_md4it() for each TLS library, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 60/220: lib/Makefile.am: make checksrc run in vquic too, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 64/220: quiche: show the actual version number, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 49/220: md4: Move the GNU TLS Nettle MD4 implementation out of the NTLM code, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 57/220: md4: Use our own MD4 implementation when no crypto libraries are available, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 62/220: http09: disable HTTP/0.9 by default in both tool and library, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 68/220: mesalink: implement client authentication, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 80/220: curl.h: add CURL_HTTP_VERSION_3 to the version enum, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 79/220: quiche: make use of the connection timeout API properly,
gnunet <=
- [GNUnet-SVN] [gnurl] 52/220: md4: Move the SecureTransport implementation out of the NTLM code, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 65/220: altsvc: make quiche use h3-22 now, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 66/220: quiche:h3_stream_recv return 0 at end of stream, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 61/220: quiche: initial h3 request send/receive, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 63/220: quiche: first working HTTP/3 request, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 76/220: quiche: flush egress in h3_stream_recv() too, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 82/220: docs/ALTSVC.md: first basic file format description, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 75/220: RELEASE-NOTES: synced, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 83/220: CURLINFO_RETRY_AFTER: parse the Retry-After header value, gnunet, 2019/09/12
- [GNUnet-SVN] [gnurl] 32/220: plan9: add support for running on Plan 9, gnunet, 2019/09/12