mirror of https://github.com/vacp2p/nim-quic.git
Add monotonic clock for packet timestamps
This commit is contained in:
parent
aae030c634
commit
a73536c10f
|
@ -1,3 +1,4 @@
|
|||
import std/monotimes
|
||||
import ngtcp2
|
||||
import ids
|
||||
import encrypt
|
||||
|
@ -48,6 +49,7 @@ proc clientDefaultSettings: ngtcp2_settings =
|
|||
result.transport_params.stateless_reset_token_present = 0
|
||||
result.transport_params.active_connection_id_limit = 8
|
||||
|
||||
result.initial_ts = getMonoTime().ticks.uint
|
||||
result.log_printf = log_printf
|
||||
|
||||
proc setupClient*(path: ptr ngtcp2_path): ptr ngtcp2_conn =
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import std/monotimes
|
||||
import ngtcp2
|
||||
import encrypt
|
||||
import decrypt
|
||||
|
@ -56,6 +57,7 @@ proc serverDefaultSettings: ngtcp2_settings =
|
|||
for i in 0..<NGTCP2_STATELESS_RESET_TOKENLEN:
|
||||
result.transport_params.stateless_reset_token[i] = uint8(i)
|
||||
|
||||
result.initial_ts = getMonoTime().ticks.uint
|
||||
result.log_printf = log_printf
|
||||
|
||||
proc setupServer*(path: ptr ngtcp2_path): ptr ngtcp2_conn =
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import unittest
|
||||
import std/monotimes
|
||||
import ngtcp2
|
||||
import helpers/server
|
||||
import helpers/client
|
||||
|
|
Loading…
Reference in New Issue