From 329513fdde49301e68891ca781e003689cb352c4 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 21 Sep 2020 11:00:44 +0200 Subject: [PATCH] Supported version field for version negotation packets --- quic/packets.nim | 12 +++++++++++- tests/quic/testPackets.nim | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/quic/packets.nim b/quic/packets.nim index 28e5fbc..9a584a0 100644 --- a/quic/packets.nim +++ b/quic/packets.nim @@ -88,9 +88,19 @@ proc `$`*(header: PacketHeader): string = proc `==`*(x: ConnectionId, y: ConnectionId): bool {.borrow.} +proc supportedVersionSlice(header: PacketHeader): Slice[int] = + let start = header.sourceSlice().b + 1 + result = start..