Add PacketHeader

This commit is contained in:
Mark Spanbroek 2020-09-16 14:44:30 +02:00 committed by markspanbroek
parent cdebcf863f
commit 24cc943dfb
6 changed files with 15 additions and 5 deletions

2
quic.nim Normal file
View File

@ -0,0 +1,2 @@
import quic/packets
export packets

6
quic/packets.nim Normal file
View File

@ -0,0 +1,6 @@
type
PacketHeaderKind* = enum
headerShort
headerLong
PacketHeader* = object
kind*: PacketHeaderKind

View File

View File

@ -0,0 +1,6 @@
import unittest
import quic
test "there are two kinds of packet headers; short and long":
discard PacketHeader(kind: headerShort)
discard PacketHeader(kind: headerLong)

View File

@ -1,4 +0,0 @@
import unittest
test "check testing framework":
check 1 == 1

View File

@ -1,4 +1,4 @@
import quic/testQuic
import quic/testPackets
import quic/testNgtcp2
{.warning[UnusedImport]:off.}