Repository navigation
Conversation
- moved to qlog_write - crypto => encryption - CRYPTO => ENCRYPTION - removed "_is_" - ngtcp2_conn_shutdown_stream_read and ngtcp2_conn_shutdown_stream_write got flag arguments - the nghttp3_callbacks struct got a recv_settings callback
- nghttp3 0.12.0
- ngtcp2 v0.16.0 asserts that timestamps passed to its function will only ever increase. - Use a context shared between ingress/egress operations that uses a shared timestamp, regularly updated during calls. - based on curl#11184 that switched ngtcp2 and family version numbers
|
|
||
| static ngtcp2_tstamp timestamp(void) | ||
| { | ||
| struct curltime ct = Curl_now(); |
There was a problem hiding this comment.
Curl_now() isn't guaranteed to always go forwards, in some situations it can jump back. For most modern platforms it is monotonic, however.
There was a problem hiding this comment.
The addition is a move, since the function is needed earlier in the code.
What is the alternative? Any recommendation?
There was a problem hiding this comment.
Unfortunately guaranteed monotonic clock adds platform dependency. There is no fully portable and widely available way to get truly monotonic clock.
Traditionally clock_gettime(CLOCK_MONOTONIC, ..) had been considered to be only increasing time stamp. However, for example macOS CLOCK_MONOTONIC isn't always monotonic and can actually jump back.
Depending on what is needed CLOCK_MONOTONIC_RAW might be suitable. This of course isn't available generally everywhere.
Reported-by: Harry Sintonen Ref: #11288
|
We can merge this and work on the clock independently, I created #11291 |
- ngtcp2 v0.16.0 asserts that timestamps passed to its function will only ever increase. - Use a context shared between ingress/egress operations that uses a shared timestamp, regularly updated during calls. Closes curl#11288
Reported-by: Harry Sintonen Ref: curl#11288 Closes curl#11291
- ngtcp2 v0.16.0 asserts that timestamps passed to its function will only ever increase. - Use a context shared between ingress/egress operations that uses a shared timestamp, regularly updated during calls. Closes curl#11288
Reported-by: Harry Sintonen Ref: curl#11288 Closes curl#11291
will only ever increase.
uses a shared timestamp, regularly updated during calls.